Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 3e924be

Browse files
committed
Merge pull request #16 from github/do-less-during-bootstrap-and-update
Do less during bootstrap and update
2 parents de5cdda + 6593066 commit 3e924be

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

script/bootstrap

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ set -e
88
cd "$(dirname "$0")/.."
99

1010
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
11-
echo "==> Installing Homebrew dependencies…"
12-
brew update
13-
brew tap homebrew/bundle 2>/dev/null
1411
brew bundle check 2>&1 >/dev/null || {
12+
echo "==> Installing Homebrew dependencies…"
1513
brew bundle
1614
}
1715
fi
1816

1917
if [ -f ".ruby-version" ] && [ -z "$(rbenv version-name 2>/dev/null)" ]; then
2018
echo "==> Installing Ruby…"
21-
rbenv install
19+
rbenv install --skip-existing
2220
which bundle 2>&1 >/dev/null || {
2321
gem install bundler
2422
rbenv rehash

script/setup

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ set -e
77

88
cd "$(dirname "$0")/.."
99

10+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
11+
brew update
12+
brew tap homebrew/bundle 2>/dev/null
13+
fi
14+
1015
script/bootstrap
1116

1217
echo "===> Setting up DB..."
1318
# reset database to a fresh state.
14-
bin/rake db:reset
19+
bin/rake db:create db:reset
1520

1621
if [ -z "$RAILS_ENV" ] && [ -z "$RACK_ENV" ]; then
1722
# Only things for a development environment will run inside here

script/update

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ script/bootstrap
1010

1111
echo "==> Updating db..."
1212
# run all database migrations to ensure everything is up to date.
13-
bin/rake db:create db:migrate
13+
bin/rake db:migrate

0 commit comments

Comments
 (0)