From c13b24fb40f5261f5004de94287a588b3ecf5874 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 21 Jan 2020 19:50:22 +0000 Subject: [PATCH 1/3] fix master/edge release provider argument conflicts --- .travis.yml | 2 +- scripts/ci/before_install.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1bb1d86079..46643ae1b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -135,7 +135,7 @@ deploy: stage: build - provider: snap snap: dvc_*.snap - channel: $SNAP_CHANNEL + channel: $RELEASE_SNAP_CHANNEL skip_cleanup: true on: all_branches: true diff --git a/scripts/ci/before_install.sh b/scripts/ci/before_install.sh index 2e9461be41..bf0f1b4c98 100644 --- a/scripts/ci/before_install.sh +++ b/scripts/ci/before_install.sh @@ -52,7 +52,7 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then fi if [[ -n "$TRAVIS_TAG" ]]; then - echo "export SNAP_CHANNEL=stable" >> env.sh + echo "export RELEASE_SNAP_CHANNEL=stable" >> env.sh else - echo "export SNAP_CHANNEL=edge" >> env.sh + echo "export RELEASE_SNAP_CHANNEL=edge" >> env.sh fi From 8a560ecaba02eeaf103dd76026a231e57dbe4688 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 21 Jan 2020 22:31:40 +0000 Subject: [PATCH 2/3] pin snap version to base version --- snap/snapcraft.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index e73da698ef..a89a1abb8e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -27,10 +27,12 @@ parts: - git override-pull: | snapcraftctl pull - echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC && git describe --tags` + echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py # install all optional extras sed -ri 's/(=install_requires)/\1+all_remotes+hdfs/' $SNAPCRAFT_PART_SRC/setup.py + sed -rn 's/^(_BASE_VERSION = .*)$/__version__ = \1/p' $SNAPCRAFT_PART_SRC/dvc/version.py > $SNAPCRAFT_PART_SRC/dvc/version.py.new + mv $SNAPCRAFT_PART_SRC/dvc/version.py.new $SNAPCRAFT_PART_SRC/dvc/version.py override-build: | snapcraftctl build cp $SNAPCRAFT_PART_BUILD/scripts/completion/dvc.bash $SNAPCRAFT_PART_INSTALL/completion.sh From a6d55e3252a3d437d25c0caa3ab45199c19bfcf5 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 21 Jan 2020 22:35:24 +0000 Subject: [PATCH 3/3] ensure correct snap version dirtyness --- snap/snapcraft.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a89a1abb8e..d1671d5a14 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -28,11 +28,12 @@ parts: override-pull: | snapcraftctl pull snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC && git describe --tags` + git diff --quiet || error_dirty_build echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py # install all optional extras sed -ri 's/(=install_requires)/\1+all_remotes+hdfs/' $SNAPCRAFT_PART_SRC/setup.py - sed -rn 's/^(_BASE_VERSION = .*)$/__version__ = \1/p' $SNAPCRAFT_PART_SRC/dvc/version.py > $SNAPCRAFT_PART_SRC/dvc/version.py.new - mv $SNAPCRAFT_PART_SRC/dvc/version.py.new $SNAPCRAFT_PART_SRC/dvc/version.py + # ensure dvc knows the state isn't really dirty + sed -rin 's/.*git.*diff.*--quiet.*//' $SNAPCRAFT_PART_SRC/dvc/version.py override-build: | snapcraftctl build cp $SNAPCRAFT_PART_BUILD/scripts/completion/dvc.bash $SNAPCRAFT_PART_INSTALL/completion.sh