-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup
More file actions
executable file
·58 lines (42 loc) · 1.54 KB
/
setup
File metadata and controls
executable file
·58 lines (42 loc) · 1.54 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh
# Set up Rails app. Run this script immediately after cloning the codebase.
# https://github.com/thoughtbot/guides/tree/master/protocol
# Exit if any subcommand fails
set -e
# Set up Ruby dependencies via Bundler
gem install bundler --conservative
bundle check || bundle install
# Note duplicated from run script.
# Start Postgres
postgres -D /usr/local/var/postgres/ &
# Start Redis
redis-server &
# Set up database and add any development seed data
bin/rake dev:prime
# Install bower dependencies
bower install
# Only if this isn't CI
# if [ -z "$CI" ]; then
# fi
if heroku join --app lambda-grader &> /dev/null; then
git remote add heroku git@heroku.com:lambda-grader.git || true
printf 'You are a collaborator on the "lambda-grader" Heroku app'
else
printf 'Ask for access to the "lambda-grader" Heroku app'
fi
# After heroku app is added grab a .env file.
# Disabled because this is too different of a config for now...
# heroku config -s > .env
# if heroku join --app lambda-staging &> /dev/null; then
# git remote add staging git@heroku.com:lambda-staging.git || true
# printf 'You are a collaborator on the "lambda-staging" Heroku app'
# else
# printf 'Ask for access to the "lambda-staging" Heroku app'
# fi
# if heroku join --app lambda-production &> /dev/null; then
# git remote add production git@heroku.com:lambda-production.git || true
# printf 'You are a collaborator on the "lambda-production" Heroku app'
# else
# printf 'Ask for access to the "lambda-production" Heroku app'
# fi
git config heroku.remote heroku