Created
April 21, 2018 23:30
-
-
Save dennisotugo/bae0148017d312ce2c8030f9d0b8a323 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # add the commit info to the commit message | |
| rev=$(git rev-parse --short HEAD) | |
| # sets an email for the git | |
| git config --global user.email "[email protected]" | |
| # sets a username for the git | |
| git config --global user.name "Travis CI" | |
| # makes a git clone of the master branch | |
| git clone -b master https://dennisotugo:${AUTOBUILD_TOKEN}@github.com/HNGInternship/HNGFun master | |
| # makes a git clone of the prod branch | |
| git clone -b prod https://dennisotugo:${AUTOBUILD_TOKEN}@github.com/HNGInternship/HNGFun prod | |
| # auto approves the coping of the profiles folder to the prod folder | |
| yes | cp -rf master/profiles/* prod/profiles/ | |
| # auto approves the coping of the answers files to the prod folder | |
| yes | cp -rf master/answer* prod/ | |
| # changes directory | |
| cd prod | |
| # adds all files in the current folder | |
| git add . | |
| # adds a commit message | |
| git commit -m "committed at ${rev} [ci skip]" | |
| # pushes to the prod branch | |
| git push origin prod | |
| # show done in the travis build console | |
| echo -e" Done " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment