mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
* 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
38 lines
921 B
Bash
Executable File
38 lines
921 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
if [ ! -d "dvc" ]; then
|
|
echo "Please run this script from repository root"
|
|
exit 1
|
|
fi
|
|
|
|
sg lxd -c snapcraft
|
|
original_snap_name="$(ls dvc_*.snap)"
|
|
mv "$original_snap_name" original.snap
|
|
|
|
git apply scripts/remove_update_warning.patch
|
|
sg lxd -c snapcraft
|
|
mv dvc_*.snap nowarn_update_"$original_snap_name".snap
|
|
mv original.snap "$original_snap_name"
|
|
|
|
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
|
|
# 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
|
|
fi
|
|
# ensure basic commands can run
|
|
# N.B.: cannot run `dvc get` on travis (#2956)
|
|
dvc version
|
|
dvc.git status
|
|
dvc.git fetch --all
|
|
sudo snap remove dvc
|