Skip to content

Commit 3f2d444

Browse files
committed
Try to fix Snap. Part 2.
Thanks to xet7 !
1 parent 9c7badb commit 3f2d444

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

releases/snap-build.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,24 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then
99
sudo systemctl enable snapd
1010
sudo systemctl start snapd
1111
sudo snap install snapcraft --classic
12-
sudo snap install multipass
12+
# sudo snap install multipass
1313
sudo snap install lxd
1414
lxd init --auto
15-
multipass delete ubu
16-
multipass purge
17-
multipass launch --name ubu
18-
snapcraft pack
15+
# multipass delete ubu
16+
# multipass purge
17+
# multipass launch --name ubu
18+
# snapcraft pack
19+
# Install and initialize LXD (if not already)
20+
sudo snap install lxd --channel=5.21/stable
21+
sudo usermod -aG lxd "$USER"
22+
newgrp lxd
23+
lxd init --minimal
24+
25+
# Build with LXD backend and verbose logs
26+
snapcraft --use-lxd --verbose
27+
# If you hit a stale state, clean and retry:
28+
#snapcraft clean
29+
#snapcraft --use-lxd --verbose
1930
exit;
2031
elif [[ "$OSTYPE" == "darwin"* ]]; then
2132
echo "macOS"

snapcraft.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ parts:
130130
- npm
131131
stage-packages:
132132
- libfontconfig1
133-
override-build: |
133+
override-build: |
134134
set -euo pipefail
135135
echo "Cleaning environment first"
136136
#rm -rf ~/.meteor ~/.npm /usr/local/lib/node_modules
137-
rm -rf .build
137+
rm -rf .build
138138
# Helper: resilient downloader (tries curl, then wget) with retries/backoff
139139
download() {
140140
url="$1"; out="$2"; attempts="${3:-5}"; sleepsec=5
@@ -248,7 +248,7 @@ parts:
248248
- apt-transport-https
249249
- gnupg
250250
- curl
251-
override-build: |
251+
override-build: |
252252
set -euo pipefail
253253
# Resilient install of Caddy: try APT with retries, fallback to static binary
254254
echo "Installing Caddy 2..."

0 commit comments

Comments
 (0)