From d020c3d8b025204bf9b81a82331df31de00f1c2d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 17 Dec 2019 19:10:26 +0000 Subject: [PATCH] test snaps even where tag is undefined --- scripts/build_snap.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/scripts/build_snap.sh b/scripts/build_snap.sh index c6208d1d5..f0c0c61c2 100755 --- a/scripts/build_snap.sh +++ b/scripts/build_snap.sh @@ -9,19 +9,20 @@ fi sudo snapcraft --use-lxd -# Make sure we have a correct version +pip uninstall -y dvc +if which dvc; then + echo "ERROR: dvc command still exists! Unable to verify dvc version." >&2 + exit 1 +fi +sudo snap install --dangerous --classic dvc_*.snap if [[ -n "$TRAVIS_TAG" ]]; then - pip uninstall -y dvc - if which dvc; then - echo "ERROR: dvc command still exists! Unable to verify dvc version." >&2 - exit 1 - fi - sudo snap install --dangerous --classic dvc_*.snap + # Make sure we have a correct version if [[ "$(dvc --version)" != "$TRAVIS_TAG" ]]; then echo "ERROR: 'dvc --version'$(dvc -V) doesn't match '$TRAVIS_TAG'" >&2 exit 1 fi - dvc version - dvc get https://github.com/iterative/dvc scripts/innosetup/dvc.ico - sudo snap remove dvc fi +# ensure basic commands can run +dvc version +dvc get https://github.com/iterative/dvc scripts/innosetup/dvc.ico +sudo snap remove dvc