Merge pull request #112 from kiwix/travis_deploy

We must deploy releases archive when a tag is set not on cron.
This commit is contained in:
Matthieu Gautier 2018-02-02 14:46:51 +01:00 committed by GitHub
commit 4ff307328f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 29 deletions

View File

@ -22,8 +22,6 @@ deploy:
provider: script provider: script
skip_cleanup: true skip_cleanup: true
script: travis/deploy.sh script: travis/deploy.sh
on:
condition: ( "$TRAVIS_EVENT_TYPE" = "cron" )
env: env:
global: global:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

View File

@ -8,6 +8,8 @@ DIST_KIWIX_ARCHIVES_DIR=${HOME}/DIST_KIWIX_ARCHIVES
DIST_ZIM_ARCHIVES_DIR=${HOME}/DIST_ZIM_ARCHIVES DIST_ZIM_ARCHIVES_DIR=${HOME}/DIST_ZIM_ARCHIVES
SSH_KEY=travis/travisci_builder_id_key SSH_KEY=travis/travisci_builder_id_key
if [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]
then
NIGHTLY_ARCHIVES=$(find $NIGHTLY_ARCHIVES_DIR -type f) NIGHTLY_ARCHIVES=$(find $NIGHTLY_ARCHIVES_DIR -type f)
if [[ "x$NIGHTLY_ARCHIVES" != "x" ]] if [[ "x$NIGHTLY_ARCHIVES" != "x" ]]
then then
@ -15,7 +17,9 @@ then
${NIGHTLY_ARCHIVES} \ ${NIGHTLY_ARCHIVES} \
nightlybot@download.kiwix.org:/var/www/download.kiwix.org/nightly/$(date +%Y-%m-%d) nightlybot@download.kiwix.org:/var/www/download.kiwix.org/nightly/$(date +%Y-%m-%d)
fi fi
fi
if [[ "x$TRAVIS_TAG" != "x" ]]
RELEASE_ARCHIVES=$(find $RELEASE_ARCHIVES_DIR -type f) RELEASE_ARCHIVES=$(find $RELEASE_ARCHIVES_DIR -type f)
if [[ "x$RELEASE_ARCHIVES" != "x" ]] if [[ "x$RELEASE_ARCHIVES" != "x" ]]
then then
@ -39,4 +43,5 @@ then
${DIST_ZIM_ARCHIVES} \ ${DIST_ZIM_ARCHIVES} \
nightlybot@download.openzim.org:/var/www/download.openzim.org/release nightlybot@download.openzim.org:/var/www/download.openzim.org/release
fi fi
fi