Created
March 30, 2013 00:02
-
-
Save wesleyhales/5274517 to your computer and use it in GitHub Desktop.
bash script for running loadreport.js against a gh-pages build
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
export REPO="$(pwd | sed s,^/home/travis/build/,,g)" | |
echo -e "Current Repo:$REPO --- Travis Branch:$TRAVIS_BRANCH" | |
#Set git user | |
git config --global user.email "[email protected]" | |
git config --global user.name "Travis" | |
#Set upstream remote | |
git remote add upstream https://${GH_TOKEN}@github.com/wesleyhales/wesleyhales.com.git > /dev/null | |
git fetch -qn upstream > /dev/null | |
if [ "$TRAVIS_BRANCH" == "master" ]; then | |
git checkout gh-pages | |
phantomjs loadreport.js http://www.wesleyhales.com performance json | |
git add -f reports/. | |
git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed to gh-pages" | |
git push https://${GH_TOKEN}@github.com/${REPO} gh-pages > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment