From 12d8cf549bce663ba85c0aa50eb565b0f1858510 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 29 Jul 2026 10:37:56 +0800 Subject: [PATCH] fix(ci): read the AppImage version from [workspace.package] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The crate split left the root manifest leading with `version.workspace = true`, so `grep -m1 '^version'` returned that line verbatim and the sed fell through unchanged. Every AppImage since was named `tty7-version.workspace = true-linux-x86_64.AppImage`, which broke the nightly publish job at `sha256sum -c` — the space-split name resolved to three missing files. bundle-linux.sh, bundle-macos.sh and bundle-windows.ps1 were already anchored on `= "`; this was the one that got missed, and the only one without a guard to catch the miss. --- .github/scripts/bundle-appimage.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/bundle-appimage.sh b/.github/scripts/bundle-appimage.sh index 4f799a36..db0e59c4 100755 --- a/.github/scripts/bundle-appimage.sh +++ b/.github/scripts/bundle-appimage.sh @@ -16,7 +16,14 @@ set -euo pipefail TARGET="$1" ARCH="$2" -VERSION="$(grep -m1 '^version' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')" +# Anchored on `= "` — see the note in bundle-macos.sh: the root manifest leads +# with `version.workspace = true`, which a bare `^version` match would return +# verbatim as the "version" and bake into every asset filename. +VERSION="$(grep -m1 '^version = "' Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')" +if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then + echo "bundle-appimage: could not read a version from Cargo.toml (got '$VERSION')" >&2 + exit 1 +fi NAME="tty7-${VERSION}-linux-${ARCH}" # AppImage tools need FUSE to self-mount; CI runners usually lack it, so extract