Created
May 7, 2017 17:37
-
-
Save gastonprieto/aa0c2162eebd8c6d941e050f7229e9bc to your computer and use it in GitHub Desktop.
github-coverage-report.sh
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
#!/bin/bash | |
if [ "$TRAVIS_BRANCH" == "master" ]; then | |
echo -e "Publishing coverage..." | |
cd $HOME | |
git config --global user.email "travis@travis-ci.org" | |
git config --global user.name "travis-ci" | |
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG gh-pages > /dev/null | |
cd gh-pages | |
git rm -rf * | |
cp -Rf $TRAVIS_BUILD_DIR/target/site/jacoco/{.,}* . | |
touch .nojekyll | |
git add -f . | |
git commit -m "Latest cobertura report on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages" | |
git push -fq origin gh-pages > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment