Skip to content

Commit 5efc3bb

Browse files
authored
snap: build fixes (#3990)
* 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 77b41a9. * fix image info * Revert "debug commit" This reverts commit 232baf0. * snap: v1 channels Related: #3872
1 parent 7230d87 commit 5efc3bb

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,12 @@ jobs:
9898
- name: lxd
9999
channel: stable
100100
env:
101-
- SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}'
101+
- SNAPCRAFT_IMAGE_INFO: |
102+
'{"build_url": "$TRAVIS_JOB_WEB_URL"}'
103+
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
104+
- SNAPCRAFT_BUILD_INFO: 1 # https://snapcraft.io/blog/introducing-developer-notifications-for-snap-security-updates
102105
install:
106+
- sudo usermod --append --groups lxd $USER
103107
- sudo /snap/bin/lxd.migrate -yes
104108
- sudo /snap/bin/lxd waitready
105109
- sudo /snap/bin/lxd init --auto

scripts/build_snap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ ! -d "dvc" ]; then
77
exit 1
88
fi
99

10-
sudo snapcraft --use-lxd
10+
sg lxd -c snapcraft
1111

1212
pip uninstall -y dvc
1313
if which dvc; then

scripts/ci/before_install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ fi
5353

5454
if [[ -n "$TRAVIS_TAG" ]]; then
5555
if [[ $(echo "$TRAVIS_TAG" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$') ]]; then
56-
echo "export SNAP_CHANNEL=stable" >>env.sh
56+
echo "export SNAP_CHANNEL=stable,v1/stable" >>env.sh
5757
else
58-
echo "export SNAP_CHANNEL=beta" >>env.sh
58+
echo "export SNAP_CHANNEL=beta,v1/beta" >>env.sh
5959
fi
6060
else
61-
echo "export SNAP_CHANNEL=edge" >>env.sh
61+
echo "export SNAP_CHANNEL=edge,v1/edge" >>env.sh
6262
fi

0 commit comments

Comments
 (0)