fix(release): stamp the Arch package version, and ship the licence with it
Publish Documentation / Build & publish docs to gitea-pages (push) Canceled after 0s
🏗️ Build and Test JellyTau / Run Tests (push) Failing after 17m49s
🏗️ Build and Test JellyTau / Android Compile Check (push) Skipped
Traceability Validation / Check Requirement Traces (push) Successful in 24s

pkgver sat at 0.0.18 while the tree was on 0.8.x, because the Arch package is
built by makepkg rather than the tauri bundler and set-version.sh never touched
it. makepkg produced a package whose version bore no relation to the source it
was built from — the exact failure that script exists to prevent, in the one
file it had missed.

Dev versions are converted to a pkgver Arch accepts: a hyphen separates pkgver
from pkgrel, so 0.9.0-3-gabc1234 becomes 0.9.0.r3.gabc1234. pkgrel resets to 1,
since a new upstream version restarts its packaging revisions.

Also installs LICENSE into /usr/share/licenses — MIT is not in Arch's common
licences, so a package under it has to carry the text.

Arch is not part of the automated release (build-release.yml covers linux,
windows and android), so v0.9.0 is unaffected; this applies to anyone building
the package by hand.
This commit is contained in:
2026-08-20 22:26:35 +02:00
parent 20e2331560
commit 4f4741cee5
3 changed files with 51 additions and 1 deletions
+6 -1
View File
@@ -8,7 +8,7 @@
# tarball/VCS URL and drop the local-copy prepare() step.
pkgname=jellytau
pkgver=0.0.18
pkgver=0.9.0
pkgrel=1
pkgdesc="A cross-platform Jellyfin client"
arch=('x86_64')
@@ -42,6 +42,11 @@ package() {
install -Dm644 "packaging/arch/jellytau.desktop" \
"$pkgdir/usr/share/applications/jellytau.desktop"
# MIT is not in /usr/share/licenses/common, so Arch packaging requires the
# licence text to ship with the package.
install -Dm644 "LICENSE" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Icons (hicolor)
install -Dm644 "src-tauri/icons/32x32.png" \
"$pkgdir/usr/share/icons/hicolor/32x32/apps/jellytau.png"
+15
View File
@@ -72,6 +72,21 @@ if [ -f src-tauri/Cargo.lock ]; then
perl -0pi -e 's/(name = "jellytau"\nversion = )"[^"]*"/$1"'"$VERSION"'"/' src-tauri/Cargo.lock
fi
# PKGBUILD — the Arch package version. Easy to miss because Arch packaging is a
# separate path from the tauri bundler, and missing it is exactly the failure
# this script exists to prevent: pkgver sat at 0.0.18 while the rest of the tree
# had moved on, so `makepkg` produced a package whose version bore no relation
# to the source it was built from. `pkgrel` resets to 1 because a new upstream
# version starts its packaging revisions over.
if [ -f packaging/arch/PKGBUILD ]; then
# Arch pkgver may not contain a hyphen (it separates pkgver from pkgrel), so a
# dev version like 0.9.0-3-gabc1234 becomes 0.9.0.r3.gabc1234, per the VCS
# package guidelines.
ARCH_VERSION="$(echo "$VERSION" | sed 's/-\([0-9]*\)-g/.r\1.g/; s/-/_/g')"
perl -0pi -e 's/^pkgver=.*$/pkgver='"$ARCH_VERSION"'/m' packaging/arch/PKGBUILD
perl -0pi -e 's/^pkgrel=.*$/pkgrel=1/m' packaging/arch/PKGBUILD
fi
# --- Android versionCode ----------------------------------------------------
# Only when the generated Android project exists (i.e. after `tauri android
# init`); on Linux/Windows jobs there is nothing to stamp.
+30
View File
@@ -54,6 +54,11 @@ function seed(dir: string) {
path.join(dir, "src-tauri", "gen", "android", "app", "tauri.properties"),
"tauri.android.versionCode=1\n"
);
fs.mkdirSync(path.join(dir, "packaging", "arch"), { recursive: true });
fs.writeFileSync(
path.join(dir, "packaging", "arch", "PKGBUILD"),
['pkgname=jellytau', 'pkgver=0.0.1', 'pkgrel=3', 'pkgdesc="x"', ''].join("\n")
);
}
function run(version: string, dir = tmp) {
@@ -178,4 +183,29 @@ describe("set-version.sh", () => {
expect(JSON.parse(read("package.json")).version).not.toBe("0.0.1");
});
});
// The Arch package is built by makepkg, not the tauri bundler, so its version
// lives in a file the rest of the release path never touches. It sat at
// 0.0.18 while the tree was on 0.8.x — makepkg happily produced a package
// whose version bore no relation to the source it was built from, which is
// the exact failure this script was written to prevent.
describe("PKGBUILD", () => {
it("stamps pkgver and resets pkgrel", () => {
run("0.9.0");
const pkgbuild = read("packaging/arch/PKGBUILD");
expect(pkgbuild).toMatch(/^pkgver=0\.9\.0$/m);
// A new upstream version starts its packaging revisions over.
expect(pkgbuild).toMatch(/^pkgrel=1$/m);
});
it("converts a dev version into a pkgver Arch accepts", () => {
// pkgver may not contain a hyphen — it is the pkgver/pkgrel separator.
run("0.9.0-3-gabc1234");
const pkgbuild = read("packaging/arch/PKGBUILD");
const match = pkgbuild.match(/^pkgver=(.*)$/m);
expect(match).not.toBeNull();
expect(match![1]).not.toContain("-");
expect(match![1]).toBe("0.9.0.r3.gabc1234");
});
});
});