ALA after_succes: on travis-ci.org
#####Make a "tmp" dir
mkdir tmp;
cd tmp;
#####Download the BASH required scripts and the lookup/mapping table
wget -q -O githubapi-get-all-repos.sh https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/bin/githubapi-get-all-repos.sh;
wget -q -O generate-github-travis-build-summary-with-grails.sh https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/bin/generate-github-travis-build-summary-with-grails.sh;
wget -q -O repo2war-name.lookup https://raw.githubusercontent.com/AtlasOfLivingAustralia/travis-build-configuration/master/bin/repo2war-name.lookup;
#####Make the scripts executable
chmod +x *.sh;
#####Execute the script to generate the ALA build status summary table:
./githubapi-get-all-repos.sh AtlasOfLivingAustralia $GIST_TOKEN | xargs ./generate-github-travis-build-summary-with-grails.sh AtlasOfLivingAustralia > summary.md;
#####Create a message we are going to use for git commit, and as well add it to the ALA build status summary page, so user can easily tell what generated the ALA build status summary
msg="$TRAVIS_REPO_SLUG, build $TRAVIS_BUILD_NUMBER";
#####Add the message to the ALA build status summary
echo "" >> summary.md;
echo "\`$msg\`" >> summary.md;
#####Setup/configure git for action :-)
git config --global user.name "mbohun";
git config --global user.email "martin.bohun@gmail.com";
git config --global push.default matching;
#####git clone the ALA build status summary gist
git clone https://$GIST_TOKEN:x-oauth-basic@gist.github.com/ee2345d4c8a80ede2628.git build_summary_table_gist.git;
cd build_summary_table_gist.git;
$GIST_TOKEN
(github token for gist access only) is used because it is less permissive (constrained to editing/modifying gist-s only) than using a "fullblown" github token (that could cause some real trouble in case it fell into the wrong hands).
#####Update the gist with the generated table
cp ../summary.md ala_build_summary_with_emoji.md;
#####Commit & push the updated gist to gist.github.com
git commit ala_build_summary_with_emoji.md -m "GENERATED on travis-ci.org by $msg";
git push -q
#####atlasoflivingaustralia.github.io index.hml page is embedding that gist, so the https://atlasoflivingaustralia.github.io will always display the most recent version of the gist.
<html>
<body>
<script src="https://gist.github.com/mbohun/ee2345d4c8a80ede2628.js"></script>
</body>
</html>