File tree Expand file tree Collapse file tree 6 files changed +43
-7
lines changed Expand file tree Collapse file tree 6 files changed +43
-7
lines changed Original file line number Diff line number Diff line change 8989 - sudo /snap/bin/lxd init --auto
9090 install :
9191 script :
92- - sudo snapcraft --use-lxd
92+ - ./scripts/build_snap.sh
9393 after_failure :
9494 - sudo journalctl -u snapd
9595
@@ -135,7 +135,7 @@ deploy:
135135 stage : build
136136 - provider : snap
137137 snap : dvc_*.snap
138- channel : ${TRAVIS_TAG:+stable}${TRAVIS_TAG:-edge}
138+ channel : $SNAP_CHANNEL
139139 skip_cleanup : true
140140 on :
141141 all_branches : true
Original file line number Diff line number Diff line change 44set -x
55
66if [ ! -d " dvc" ]; then
7- echo " Please run this script from repository root"
7+ echo " Please run this script from repository root" >&2
88 exit 1
99fi
1010
@@ -17,12 +17,12 @@ python setup.py bdist_wheel --universal
1717if [[ -n " $TRAVIS_TAG " ]]; then
1818 pip uninstall -y dvc
1919 if which dvc; then
20- echo " ERROR: dvc command still exists! Unable to verify dvc version."
20+ echo " ERROR: dvc command still exists! Unable to verify dvc version." >&2
2121 exit 1
2222 fi
2323 pip install dist/dvc-* .whl
2424 if [[ " $( dvc --version) " != " $TRAVIS_TAG " ]]; then
25- echo " ERROR: 'dvc --version'$( dvc -V) doesn't match '$TRAVIS_TAG '"
25+ echo " ERROR: 'dvc --version'$( dvc -V) doesn't match '$TRAVIS_TAG '" >&2
2626 exit 1
2727 fi
2828 pip uninstall -y dvc
Original file line number Diff line number Diff line change 2929
3030print_error ()
3131{
32- echo -e " \e[31m$1 \e[0m"
32+ echo -e " \e[31m$1 \e[0m" >&2
3333}
3434
3535if [ ! -d " dvc" ]; then
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+ set -x
4+
5+ if [ ! -d " dvc" ]; then
6+ echo " Please run this script from repository root"
7+ exit 1
8+ fi
9+
10+ sudo snapcraft --use-lxd
11+
12+ pip uninstall -y dvc
13+ if which dvc; then
14+ echo " ERROR: dvc command still exists! Unable to verify dvc version." >&2
15+ exit 1
16+ fi
17+ sudo snap install --dangerous --classic dvc_* .snap
18+ if [[ -n " $TRAVIS_TAG " ]]; then
19+ # Make sure we have a correct version
20+ if [[ " $( dvc --version) " != " $TRAVIS_TAG " ]]; then
21+ echo " ERROR: 'dvc --version'$( dvc -V) doesn't match '$TRAVIS_TAG '" >&2
22+ exit 1
23+ fi
24+ fi
25+ # ensure basic commands can run
26+ # N.B.: cannot run `dvc get` on travis (#2956)
27+ dvc version
28+ dvc.git status
29+ dvc.git fetch --all
30+ sudo snap remove dvc
Original file line number Diff line number Diff line change @@ -50,3 +50,9 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
5050 ln -s -f /usr/local/bin/python3 /usr/local/bin/python
5151 ln -s -f /usr/local/bin/pip3 /usr/local/bin/pip
5252fi
53+
54+ if [[ -n " $TRAVIS_TAG " ]]; then
55+ echo " export SNAP_CHANNEL=stable" >> env.sh
56+ else
57+ echo " export SNAP_CHANNEL=edge" >> env.sh
58+ fi
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ summary: Data Version Control
33description : Git for Data & Models https://dvc.org
44adopt-info : dvc
55grade : stable
6- confinement : classic # for same reasons as snap `git-ubuntu`
6+ confinement : classic # for `dvc run`ning external binaries
77base : core18
88license : Apache-2.0
99layout :
You can’t perform that action at this time.
0 commit comments