mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:54:56 +02:00
Stop running snapcraft with sudo (#8063)
* Do not use sudo when building the snap. * add user to lxd * Run with lxd group.
This commit is contained in:
@@ -6,9 +6,15 @@ if [[ -z "$TRAVIS" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add the current user to the lxd group so they can run `snapcraft --use-lxd`
|
||||
# without sudo since running the command without sudo is required by newer
|
||||
# versions of snapcraft.
|
||||
sudo usermod -aG lxd "$USER"
|
||||
sudo /snap/bin/lxd.migrate -yes
|
||||
sudo /snap/bin/lxd waitready
|
||||
sudo /snap/bin/lxd init --auto
|
||||
tools/strip_hashes.py letsencrypt-auto-source/pieces/dependency-requirements.txt > constraints.txt
|
||||
sudo snapcraft --use-lxd
|
||||
# Run snapcraft with the lxd group since it has not been added to the current
|
||||
# shell.
|
||||
sg lxd -c 'snapcraft --use-lxd'
|
||||
sudo snap install --dangerous --classic *.snap
|
||||
|
||||
Reference in New Issue
Block a user