fix: snap build
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Build and Release / Build macos-x64 (push) Waiting to run
Build and Release / Build macos-arm64 (push) Waiting to run
Build and Release / Build linux-arm64 (push) Waiting to run
Build and Release / Build linux-x64 (push) Waiting to run
Build and Release / Build windows-arm64 (push) Waiting to run
Build and Release / Build windows-x64 (push) Waiting to run
Build and Release / Create Release (push) Blocked by required conditions

This commit is contained in:
2026-09-14 14:38:25 +07:00
parent e61caf8482
commit a85b5ee87b
2 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ contact: https://reya.su
parts:
signed:
plugin: dump
source: target/release/signed-linux-$ARCH_SUFFIX.tar.gz
source: target/release/signed-linux-$TARBALL_ARCH_SUFFIX.tar.gz
organize:
# These renames seem to not be necessary, but it's tidier.
+6 -3
View File
@@ -11,9 +11,12 @@ ARCH=$(uname -m)
# Snap uses its own architecture names, which must match the file name and
# the architecture asserted inside the .snap. `x86_64`/`aarch64` here would
# produce a file like signed_1.0.0_x86_64.snap that snapd cannot match.
#
# The source tarball is named by `script/bundle-linux` after `uname -m`, so it
# keeps the x86_64/aarch64 spelling rather than the snap-native one.
case "$ARCH" in
x86_64|amd64) ARCH_SUFFIX="amd64" ;;
aarch64|arm64) ARCH_SUFFIX="arm64" ;;
x86_64|amd64) ARCH_SUFFIX="amd64"; TARBALL_ARCH_SUFFIX="x86_64" ;;
aarch64|arm64) ARCH_SUFFIX="arm64"; TARBALL_ARCH_SUFFIX="aarch64" ;;
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
@@ -27,7 +30,7 @@ envsubst < "desktop/resources/signed.desktop.in" > "snap/gui/signed.desktop"
cp "desktop/resources/icon.png" "snap/gui/signed.png"
# Generate snapcraft.yaml with version and architecture
RELEASE_VERSION="$1" ARCH_SUFFIX="$ARCH_SUFFIX" envsubst < desktop/resources/snap/snapcraft.yaml.in > snap/snapcraft.yaml
RELEASE_VERSION="$1" TARBALL_ARCH_SUFFIX="$TARBALL_ARCH_SUFFIX" envsubst < desktop/resources/snap/snapcraft.yaml.in > snap/snapcraft.yaml
# Clean previous builds
snapcraft clean