fix(packaging): strip staged figcraft-nightly from Arch handoff and re-enable arch (#2727)

This commit is contained in:
Dylan M. Taylor authored and GitHub committed 2026-11-28 22:01:28 -05:00
1 parent 88c702e296
commit 3a8a08ca74
3 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -32,4 +32,4 @@ jobs:
# craft-common-actions main commit that merged the exact-analysis admission (#371, after #370,
# #369 and #364).
platforms: '["windows-x86_64","linux-x86_64","macos-aarch64"]'
linux-package-formats: '["deb","rpm","appimage","flatpak","oci"]'
linux-package-formats: '["deb","rpm","appimage","flatpak","oci","arch"]'
+4
View File
@@ -18,10 +18,14 @@ printf '<%s>\n' "$@"
RECORDER
chmod 755 "$stage/bin/figcraft"
cp "$stage/bin/figcraft" "$stage/bin/figcraft-cli"
# package.sh stages bin/figcraft-nightly alongside bin/figcraft; verify the handoff strips it.
printf '#!/bin/sh\necho stale-launcher\n' >"$stage/bin/figcraft-nightly"
chmod 755 "$stage/bin/figcraft-nightly"
bash "$HERE/nightly-arch-tar.sh" "$stage" "$work/stage" "$dst" "$base"
tar -xzf "$dst/$base.tar.gz" -C "$work/extract"
bin="$work/extract/$base/bin"
[[ ! -e "$bin/figcraft-nightly" ]] || { echo "FAIL: Arch handoff must not contain bin/figcraft-nightly" >&2; exit 1; }
# Simulate the existing Arch bin-tree copy and public launcher rename.
mkdir -p "$work/installed"
cp -R "$bin" "$work/installed/bin"
+3
View File
@@ -11,6 +11,9 @@ stage="$work/$basename"
mkdir -p "$work"
cp -R "$source_tree" "$stage"
# package.sh stages bin/figcraft-nightly alongside bin/figcraft for tar/AppImage; remove it from
# the Arch handoff so arch-package.sh can rename bin/figcraft -> bin/figcraft-nightly cleanly.
rm -f "$stage/bin/figcraft-nightly"
mkdir "$stage/bin/.figcraft-nightly"
mv "$stage/bin/figcraft" "$stage/bin/.figcraft-nightly/figcraft"
awk -v real='"$(dirname "$0")/.figcraft-nightly/figcraft"' '{ gsub(/@REAL_BIN@/, real); print }' \