Make travisCI publish binaries as release versions when tag is pushed.

This publish the same this that nightly build except that :
- Use the `--make-release` option to force kiwix-build to use tagged
  version of subprojects.
- The archives are named using the tag name.
- The archives are pushed to "releases" directory in download.kiwix.org.
This commit is contained in:
Matthieu Gautier
2017-11-28 16:43:52 +00:00
parent e4f8b6c7a9
commit bb5b85da50
2 changed files with 64 additions and 28 deletions

View File

@ -3,6 +3,7 @@
set -e
NIGHTLY_ARCHIVES_DIR=${HOME}/NIGHTLY_ARCHIVES
RELEASE_ARCHIVES_DIR=${HOME}/RELEASE_ARCHIVES
SSH_KEY=travis/travisci_builder_id_key
NIGHTLY_ARCHIVES=$(find $NIGHTLY_ARCHIVES_DIR -type f)
@ -12,3 +13,11 @@ then
${NIGHTLY_ARCHIVES} \
nightlybot@download.kiwix.org:/var/www/download.kiwix.org/nightly/$(date +%Y-%m-%d)
fi
RELEASE_ARCHIVES=$(find $RELEASE_ARCHIVES_DIR -type f)
if [[ "x$RELEASE_ARCHIVES" != "x" ]]
then
scp -vrp -i ${SSH_KEY} \
${RELEASE_ARCHIVES} \
nightlybot@downoald.kiwix.org:/var/www/download.kiwix.org/releases
fi