mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-13 23:10:15 +01:00
snap: v0: build fixes & updates (#3999)
* snap: drop sudo Fixes #3989 * snap: ci: fix builds * snap: ci: developer notifications * snap: minimise size * debug commit * Revert "snap: minimise size" This reverts commit 77b41a96f68b2c8df833803d0a644172b7db4779. * fix image info * Revert "debug commit" This reverts commit 232baf0ad78335b0f3806456a3f20b82cdf0f24c. * snap: v1 channels Related: #3872 * snap: v0 channels Related #3990 Related #3989 * snap: auto-version (major) detect * ci: fetch --tags explanation & error checking * snap: update warning framework * hardocde warning * add deprecation dev comment * remove warning on explicit v0 channel * tidy comment * fix py2
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
diff --git a/dvc/updater.py b/dvc/updater.py
|
||||
index d6dc372..cfa416f 100644
|
||||
--- a/dvc/updater.py
|
||||
+++ b/dvc/updater.py
|
||||
@@ -48,15 +48,7 @@ class Updater(object): # pragma: no cover
|
||||
logger.debug(msg.format(self.lock.lockfile, action))
|
||||
|
||||
def check(self):
|
||||
- if os.getenv("CI") or env2bool("DVC_TEST"):
|
||||
- return
|
||||
-
|
||||
- if PKG == "snap":
|
||||
- # hardcoded transition message
|
||||
- version_major = version.parse(self.current).major
|
||||
- self.current = "v{}".format(version_major)
|
||||
- self.latest = "v{}".format(version_major + 1)
|
||||
- self._notify()
|
||||
+ if os.getenv("CI") or env2bool("DVC_TEST") or PKG == "snap":
|
||||
return
|
||||
|
||||
self._with_lock(self._check, "checking")
|
||||
@@ -146,17 +138,6 @@ class Updater(object): # pragma: no cover
|
||||
),
|
||||
"conda": "Run `{yellow}conda{reset} update dvc`",
|
||||
"choco": "Run `{yellow}choco{reset} upgrade dvc`",
|
||||
- "snap": (
|
||||
- "To upgrade to the latest major release,\n"
|
||||
- "run `{yellow}snap{reset} refresh --channel=latest/beta`, or\n"
|
||||
- "to stay on the current major release track,\n"
|
||||
- "run `{yellow}snap{reset} refresh --channel={current}/stable`"
|
||||
- "\n\n"
|
||||
- "{red}WARNING{reset}: ignoring this message will result in\n"
|
||||
- "snap automatically performing an upgrade soon.\n"
|
||||
- "More information can be found at\n"
|
||||
- "{blue}https://github.com/iterative/dvc/issues/3872{reset}"
|
||||
- ),
|
||||
None: (
|
||||
"Find the latest release at\n"
|
||||
"{blue}https://github.com/iterative/dvc/releases/latest{reset}"
|
||||
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
|
||||
index 75d0f7d..996db8c 100644
|
||||
--- a/snap/snapcraft.yaml
|
||||
+++ b/snap/snapcraft.yaml
|
||||
@@ -30,7 +30,6 @@ 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
|
||||
Reference in New Issue
Block a user