File tree 3 files changed +11
-3
lines changed 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ jobs:
106
106
- sudo /snap/bin/lxd.migrate -yes
107
107
- sudo /snap/bin/lxd waitready
108
108
- sudo /snap/bin/lxd init --auto
109
+ - git fetch --tags
109
110
script :
110
111
- ./scripts/build_snap.sh
111
112
after_failure :
Original file line number Diff line number Diff line change 15
15
16
16
echo > env.sh
17
17
18
- if [[ " $TRAVIS_BUILD_STAGE_NAME " == " Test " ]]; then
18
+ if [[ " $TRAVIS_BUILD_STAGE_NAME " == " test " ]]; then
19
19
if [[ " $TRAVIS_OS_NAME " != " windows" ]]; then
20
20
# NOTE: ssh keys for ssh test to be able to ssh to the localhost
21
21
ssh-keygen -t rsa -N " " -f mykey
@@ -52,7 +52,11 @@ elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
52
52
fi
53
53
54
54
if [[ -n " $TRAVIS_TAG " ]]; then
55
- echo " export SNAP_CHANNEL=stable" >> env.sh
55
+ if [[ $( echo " $TRAVIS_TAG " | grep -E ' ^[0-9]+\.[0-9]+\.[0-9]+$' ) ]]; then
56
+ echo " export SNAP_CHANNEL=stable" >> env.sh
57
+ else
58
+ echo " export SNAP_CHANNEL=beta" >> env.sh
59
+ fi
56
60
else
57
61
echo " export SNAP_CHANNEL=edge" >> env.sh
58
62
fi
Original file line number Diff line number Diff line change 29
29
- git
30
30
override-pull : |
31
31
snapcraftctl pull
32
- snapcraftctl set-version ` cd $SNAPCRAFT_PART_SRC && git describe --tags`
32
+ snapcraftctl set-version $( cd $SNAPCRAFT_PART_SRC && git describe --tags)
33
33
git diff --quiet || error_dirty_build
34
34
echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py
35
35
# install all optional extras
38
38
sed -rin 's/.*git.*diff.*--quiet.*//' $SNAPCRAFT_PART_SRC/dvc/version.py
39
39
override-build : |
40
40
snapcraftctl build
41
+ # prevent user site packages interfering with this snap - reference:
42
+ # https://github.com/snapcore/snapcraft/blob/19393ef36cd773a28131cec10cc0bfb3bf9c7e77/tools/snapcraft-override-build.sh#L18
43
+ sed -ri 's/^(ENABLE_USER_SITE = )None$/\1False/' $SNAPCRAFT_PART_INSTALL/usr/lib/python*/site.py
41
44
cp $SNAPCRAFT_PART_BUILD/scripts/completion/dvc.bash $SNAPCRAFT_PART_INSTALL/completion.sh
42
45
apps :
43
46
dvc :
You can’t perform that action at this time.
0 commit comments