Skip to content

Commit

Permalink
Use 2 deploy providers in .travis.yml to handle nightly and tags.
Browse files Browse the repository at this point in the history
It does not seem to be possible to have only one script launched in
both cases.
Should really fix #245
  • Loading branch information
mossroy committed Jun 2, 2017
1 parent d37f971 commit 5d019dc
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ script:
- "./node_modules/nightwatch/bin/nightwatch -c nightwatch.js --env firefox"
- pkill node
deploy:
provider: script
# This deployment handles 2 different cases :
# - the nightly builds (launched by cron)
# - the generation of packages for public releases (launched by a tag)
# In both cases, we run the same script, but with different command-line arguments
script: if [ "${TRAVIS_TAG}aa" = "aa" ]; then CMD_ARGS=""; else CMD_ARGS="-t -v ${TRAVIS_TAG}"; fi && ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh $CMD_ARGS
on:
condition: ( "$TRAVIS_EVENT_TYPE" = "cron" || "${TRAVIS_TAG}bb" != "bb" )
- provider: script
# Nightly builds (launched by cron)
script: ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh
on:
condition: ( "$TRAVIS_EVENT_TYPE" = "cron" )
- provider: script
# Generation of packages for public releases (launched by a tag)
script: ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh -t -v ${TRAVIS_TAG}
on:
tags: true

0 comments on commit 5d019dc

Please sign in to comment.