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