forked from kunalkapadia/express-mongoose-es6-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.sh
38 lines (23 loc) · 893 Bytes
/
travis.sh
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
git config --global user.name "$GIT_USER_NAME"
git config --global user.email $GIT_USER_EMAIL
# Install the Heroku gem (or the Heroku toolbelt)
gem install $PROVIDER
# Add your Heroku git repo:
git remote rm $PROVIDER ;
git remote add $PROVIDER git@$PROVIDER.com:$PROVIDER_APP_NAME.git ;
# Add your Heroku API key:
export HEROKU_API_KEY=$HEROKU_API_KEY
# Turn off warnings about SSH keys:
echo " Host heroku.com" >> ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
echo " CheckHostIP no" >> ~/.ssh/config
echo " UserKnownHostsFile=/dev/null" >> ~/.ssh/config
# Clear your current Heroku SSH keys:
$PROVIDER keys:clear
# Add a new SSH key to Heroku
yes | $PROVIDER keys:add
git add dist/ ;
git checkout -b $NEW_TRAVIS_BRANCH ;
git commit -m "$TRAVIS_COMMIT_MESSAGE" ;
# Push to Heroku
yes | git push --force $PROVIDER $NEW_TRAVIS_BRANCH:$PROVIDER_BRANCH ;