release from travis-ci.org
setup:
# go to github and create github token, hereafter refered to as $GITHUB_TOKEN
# for commiting/pushing from travis-ci.org make it AS RESTRICTED AS POSSIBLE !!!
#
git clone git@github.com:AtlasOfLivingAustralia/ala-web-theme.git
cd ala-web-theme
travis login --github-token $YOUR_CURRENT_GITHUB_TOKEN
travis encrypt -a -p "GITHUB_TOKEN=23ef23aab45f0"
# this added the new encrypted env var $GITHUB_TOKEN to:
# - your .travis.yml
# - https://travis-ci.org/AtlasOfLivingAustralia/ala-web-theme
git commit -m "added github token for commits/pushes" .travis.yml
git push
addition to .travis.yml
file
mkdir ./tmp
cd ./tmp
# well we should really have some atlasoflivingaustralia bot/user for this user.name/user.email
git config --global user.name "mbohun";
git config --global user.email "martin.bohun@gmail.com";
git config --global push.default matching;
git clone https://$GITHUB_TOKEN:x-oauth-basic@github.com/AtlasOfLivingAustralia/ala-web-theme.git
# extract current version from the AlaWebThemeGrailsPlugin.groovy
APP_VERSION=`grep '^\s*def\s*version' *GrailsPlugin.groovy | sed -e 's/^.*= *"//g' | sed -e 's/".*$//g' | tr -d "\r"`
# here is the problematic, resp.arbitrary part, how to upgrade the version number?
# is 1.23 going to be bumped to 1.24-SNAPSHOT or to 1.30-SNAPSHOT or 2.00-SNAPSHOT ?
# once we agree on this logic, a simple sed substitution will replace the existing version with the new version
# i guess next you apply a git $TAG, and push the updated AlaWebThemeGrailsPlugin.groovy and the tag back to github:
# TAG can be for example set to APP_VERSION
git commit -m "$CREATE_SOME_GIT_COMMIT_MSG" AlaWebThemeGrailsPlugin.groovy
git tag -a $TAG -m "$TAG_COMMIT_MSG"
git push -q origin $TAG
git push -q