snap: v0: build fixes & updates#3999
Conversation
This reverts commit 77b41a9.
This reverts commit 232baf0.
Related: treeverse#3872
Related treeverse#3990 Related treeverse#3989
| # fetch tags for `git-describe`, since | ||
| # - can't rely on $TRAVIS_TAG for `edge` (master) releases, and | ||
| # - `snapcraft` also uses `git-describe` for version detection | ||
| git fetch --tags | ||
| TAG_MAJOR="$(git describe --tags | sed -r 's/^v?([0-9]+)\.[0-9]+\.[0-9]+.*/\1/')" | ||
| [[ -n "$TAG_MAJOR" ]] || exit 1 # failed to detect major version | ||
| if [[ -n "$TRAVIS_TAG" ]]; then | ||
| if [[ $(echo "$TRAVIS_TAG" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$') ]]; then | ||
| echo "export SNAP_CHANNEL=stable" >>env.sh | ||
| echo "export SNAP_CHANNEL=stable,v$TAG_MAJOR/stable" >>env.sh | ||
| else | ||
| echo "export SNAP_CHANNEL=beta" >>env.sh | ||
| echo "export SNAP_CHANNEL=beta,v$TAG_MAJOR/beta" >>env.sh | ||
| fi | ||
| else | ||
| echo "export SNAP_CHANNEL=edge" >>env.sh | ||
| echo "export SNAP_CHANNEL=edge,v$TAG_MAJOR/edge" >>env.sh | ||
| fi |
There was a problem hiding this comment.
Oops, missed that this is only for 0.94-dev branch. I guess we need to port to the master too.
There was a problem hiding this comment.
yes, will do later
|
@casperdcl What's the status on this PR? |
|
I've thought long and hard about this - the only reservation I have is that the hardcoded warning will display even if users run
|
| "{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}" |
There was a problem hiding this comment.
Ideally need a dvc.org link to migration/breaking changes.
https://dvc.org/doc/install/pre-release is currently not quite appropriate.
|
@casperdcl Maybe let's not bother with the warning at all? Running snap from dvc on each command is a definite no-go. |
| original_snap_name="$(ls dvc_*.snap)" | ||
| mv "$original_snap_name" original.snap | ||
|
|
||
| git apply scripts/remove_update_warning.patch |
There was a problem hiding this comment.
This will make dvc --version show up as dirty
There was a problem hiding this comment.
yes; I don't think that's an issue.
|
yes nothing's run each command - it's all hard-coded now for snap releases:
|
|
@efiop this should be fine to merge now. The two unchecked boxes are optional follow-up items, really. |
Related: treeverse#3999 Related: treeverse#4037
v1fixes & updates snap: build fixes #3990 <- snap: 'sudo' cannot be used with build provider 'lxd' #3989v0channels snap: transition to v1 #3872