From 3ca3eba6d55f404eb5010754c4db959a165762a7 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 27 Jul 2026 15:07:40 -0400 Subject: [PATCH] packaging: stamp the pacman package with the version actually built MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It read the version straight out of tauri.conf.json, which was correct until dev builds started overriding the version on the command line — the file still says 0.1.0, so release `dev` came out carrying a pacman package labelled 0.1.0 around a binary that reports 0.1.132. Nothing breaks from it (a pacman install can't self-update anyway), but a package that lies about its version is exactly what makes a later "which build is this?" impossible to answer. Now uses the same build-version.sh the bundles and the manifest do. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SreJkbxB4gx8pPsu8QbLPi --- desktop/packaging/arch/package-prebuilt.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/desktop/packaging/arch/package-prebuilt.sh b/desktop/packaging/arch/package-prebuilt.sh index f4ddf1c..4749bed 100755 --- a/desktop/packaging/arch/package-prebuilt.sh +++ b/desktop/packaging/arch/package-prebuilt.sh @@ -51,14 +51,17 @@ DEPENDS=(webkit2gtk-4.1 gtk3) exit 1 } -# Single source of truth for the version: the same tauri.conf.json value the -# .deb and the AppImage are stamped with, so all three artifacts on a release -# always agree. Plain grep — jq is not guaranteed in the CI image. +# Single source of truth for the version: the SAME helper the bundle build uses. +# +# It used to read tauri.conf.json directly, which was right until dev builds began +# overriding the version on the command line (M10.9) — the file still says 0.1.0, so +# the pacman package came out stamped 0.1.0 around a binary reporting 0.1.132. A +# package that lies about its version is exactly what makes a later "which build is +# this?" question unanswerable. # `|| true` so a miss falls through to the explicit error below rather than # aborting on pipefail with no explanation. -PKGVER="$(grep -oE '"version"[[:space:]]*:[[:space:]]*"[^"]+"' "$SRC_TAURI/tauri.conf.json" | - head -1 | sed -E 's/.*"([^"]+)"$/\1/' || true)" -[ -n "$PKGVER" ] || { echo "ERROR: could not read version from tauri.conf.json" >&2; exit 1; } +PKGVER="$(sh "$SCRIPT_DIR/../build-version.sh" || true)" +[ -n "$PKGVER" ] || { echo "ERROR: could not determine the build version" >&2; exit 1; } # Reproducible-ish: prefer the commit date over "now" so rebuilding the same # commit produces the same builddate.