We must deploy releases archive when a tag is set not on cron.

This commit is contained in:
Matthieu Gautier 2018-02-02 12:07:01 +01:00
parent 524da9c4fe
commit cb468fc49f
2 changed files with 32 additions and 29 deletions

View File

@ -22,8 +22,6 @@ deploy:
provider: script
skip_cleanup: true
script: travis/deploy.sh
on:
condition: ( "$TRAVIS_EVENT_TYPE" = "cron" )
env:
global:
- 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
SSH_KEY=travis/travisci_builder_id_key
if [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]
then
NIGHTLY_ARCHIVES=$(find $NIGHTLY_ARCHIVES_DIR -type f)
if [[ "x$NIGHTLY_ARCHIVES" != "x" ]]
then
@ -15,7 +17,9 @@ then
${NIGHTLY_ARCHIVES} \
nightlybot@download.kiwix.org:/var/www/download.kiwix.org/nightly/$(date +%Y-%m-%d)
fi
fi
if [[ "x$TRAVIS_TAG" != "x" ]]
RELEASE_ARCHIVES=$(find $RELEASE_ARCHIVES_DIR -type f)
if [[ "x$RELEASE_ARCHIVES" != "x" ]]
then
@ -39,4 +43,5 @@ then
${DIST_ZIM_ARCHIVES} \
nightlybot@download.openzim.org:/var/www/download.openzim.org/release
fi
fi