Created
March 30, 2015 14:28
-
-
Save raymcdermott/c961c3dd37d425af9c35 to your computer and use it in GitHub Desktop.
Run a deployment from Bamboo to Heroku with independence from locally installed tools
This file contains 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
#!/usr/bin/env bash | |
############ CONFIGURE GIT from this repo | |
git config user.email "[email protected]" | |
git config user.name "Bamboo Dev" | |
# Add a remote master to Heroku (if one does not exist) | |
(git remote -v | grep "^heroku" > /dev/null) || | |
heroku git:remote --app $HEROKU_APP_NAME --org $HEROKU_ORG_NAME | |
############ LOCAL INSTALL of node build pipeline tools | |
# use npm to install the latest npm in this repo | |
npm install npm | |
# use the new npm to install other tools for this repo | |
alias npm="node $PWD/node_modules/npm/bin/npm-cli.js" | |
# install react tools | |
npm install react-tools | |
########### RUN BUILD PIPELINE | |
PATH=node_modules/react-tools/bin:$PATH | |
reactSrcDirectory=react-src | |
reactOutputDirectory=public/sso | |
jsx ${reactSrcDirectory} ${reactOutputDirectory} | |
# Use --force to override the usual .gitignore rule | |
git add --all --force ${reactOutputDirectory} | |
git commit -a -m bamboo-build | |
########### PUSH TO HEROKU | |
git push --force heroku master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment