From f80626b5d0acab92f42ef471b4f4602dc8711743 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 19 Jan 2020 19:09:47 +0000 Subject: [PATCH] recompress conditional snap channel --- .travis.yml | 15 +++------------ scripts/ci/before_install.sh | 6 ++++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 14451410a..1bb1d8607 100644 --- a/.travis.yml +++ b/.travis.yml @@ -135,19 +135,10 @@ deploy: stage: build - provider: snap snap: dvc_*.snap - channel: stable + channel: $SNAP_CHANNEL skip_cleanup: true on: - condition: "$(./scripts/ci/deploy_condition.sh dvc_*.snap)" - tags: true - repo: iterative/dvc - stage: build - - provider: snap - snap: dvc_*.snap - channel: edge - skip_cleanup: true - on: - branch: master - condition: "$(./scripts/ci/deploy_condition.sh dvc_*.snap)" + all_branches: true + condition: "$(./scripts/ci/deploy_condition.sh dvc_*.snap) && ($TRAVIS_BRANCH = master || -n $TRAVIS_TAG)" repo: iterative/dvc stage: build diff --git a/scripts/ci/before_install.sh b/scripts/ci/before_install.sh index 27c423b7d..2e9461be4 100644 --- a/scripts/ci/before_install.sh +++ b/scripts/ci/before_install.sh @@ -50,3 +50,9 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ln -s -f /usr/local/bin/python3 /usr/local/bin/python ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip fi + +if [[ -n "$TRAVIS_TAG" ]]; then + echo "export SNAP_CHANNEL=stable" >> env.sh +else + echo "export SNAP_CHANNEL=edge" >> env.sh +fi