Skip to content

Commit 0cca002

Browse files
committed
Update bootstrap and setup scripts
1 parent ca02922 commit 0cca002

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

script/bootstrap

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#!/bin/sh
22

3-
# Set up Ruby dependencies and the local SQLite database.
4-
bundle check 2>&1 > /dev/null || bundle install --binstubs --path vendor/gems
5-
cp config/database.yml.example config/database.yml
6-
bundle exec rake db:migrate
3+
# script/bootstrap: Resolve all dependencies that the application requires to
4+
# run.
5+
6+
set -e
7+
8+
cd "$(dirname "$0")/.."
9+
10+
# Install all of our gems if we need to
11+
bundle check 2>&1 || {
12+
echo "==> Installing gem dependencies..."
13+
bundle install --without production
14+
}

script/setup

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,33 @@
1+
#!/bin/sh
2+
3+
# script/setup: Set up application for the first time after cloning, or set it
4+
# back to the initial first unused state.
5+
6+
set -e
7+
8+
cd "$(dirname "$0")/.."
9+
110
script/bootstrap
211

3-
export GIT_REPO=../git/.git
12+
echo "==> Setting up DB..."
13+
bin/rake db:create db:reset
14+
15+
echo "==> Building Git Docs..."
16+
if ! [ -d "../git" ]; then
17+
git clone git://github.com/git/git.git ../git
18+
fi
19+
20+
bin/rake local_index
421

5-
# Build git docs
6-
git clone git://github.com/git/git.git ../git
7-
bundle exec rake local_index
22+
echo "==> Fetching downloads..."
23+
bin/rake downloads
824

9-
# Fetch downloads
10-
rake downloads
25+
if [ -z "$RAILS_ENV" ] && [ -z "$RACK_ENV" ]; then
26+
# Only things for a development environment will run inside here
27+
# Do things that need to be done to the application to set up for the first
28+
# time. Or things needed to be run to to reset the application back to first
29+
# use experience. These things are scoped to the application's domain.
30+
true
31+
fi
1132

33+
echo "==> App is now ready to go!"

0 commit comments

Comments
 (0)