forked from github/developer.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·34 lines (29 loc) · 894 Bytes
/
bootstrap
File metadata and controls
executable file
·34 lines (29 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
set -e
cd "$(dirname "$0")/.."
if [ "$(uname -s)" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
echo "==> Installing Homebrew dependencies…"
brew update >/dev/null
brew bundle check &>/dev/null || brew bundle
brew bootstrap-rbenv-ruby
brew bootstrap-nodenv-node
fi
if ! command -v bundle >/dev/null 2>&1; then
echo "Bundler required but not found: gem install bundler" >&2
exit 1
fi
echo "==> Installing gem dependencies…"
if [ "$RACK_ENV" = "production" ]; then
export NOKOGIRI_USE_SYSTEM_LIBRARIES=1
export BUNDLE_JOBS=4
bundle install --without development staging test benchmark --path vendor/cache --local --deployment
else
bundle check --path vendor/cache 2>&1 || \
bundle install --path vendor/cache
fi
echo "==> Installing npm dependencies…"
if [ "$RACK_ENV" = "production" ]; then
npm install --production
else
npm install
fi