After release assets have all uploaded, dispatch the exact repository and tag to house-of-vanity/arch_repo using the ARCH_REPO_TOKEN Actions secret. Keep this in a separate job so notification failures can be retried without rebuilding a release; a missing token fails with an actionable message. Document repository setup, installation, publication status and recovery. Fix Arch version ordering discovered during integration: 0.1.0_rc.10 sorts above 0.1.0 in pacman. Attach prerelease suffixes directly and add epoch 1 so existing installations can migrate and later upgrade to stable. Keep the epoch out of filenames and align both GitHub and Gitea packaging filenames. Git tags and application versions are unchanged. Add real packaging/vercmp checks. Validation: Arch packaging and version-order checks passed in an Arch Linux Docker container, including CLI and GUI packages. cargo fmt --all -- --check, cargo clippy --locked --workspace --all-targets -- -D warnings and cargo test --locked --workspace --all-targets passed on macOS (default ignored tests stayed ignored). GitHub release workflow passed actionlint. Running GitHub actionlint on the Gitea workflow only reported its deliberately retained v3 artifact actions, which are supported by Gitea but retired on GitHub. git diff --check passed.
30 lines
1.2 KiB
Bash
30 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Exercise the real packager and pacman's ordering rules on Arch Linux.
|
|
set -euo pipefail
|
|
here="$(cd "$(dirname "$0")" && pwd)"
|
|
work="$(mktemp -d)"
|
|
trap 'rm -rf "$work"' EXIT
|
|
|
|
for version in 0.1.0-rc.9 0.1.0-rc.10 0.1.0; do
|
|
pkgver="${version//-/}"
|
|
output="$work/tsunagi-${pkgver}-1-x86_64.pkg.tar.zst"
|
|
bash "$here/build-pkg.sh" /usr/bin/true x86_64 "$version" "$output"
|
|
bsdtar -xOf "$output" .PKGINFO > "$work/pkginfo"
|
|
grep -qx "pkgver = 1:${pkgver}-1" "$work/pkginfo"
|
|
grep -qx 'pkgname = tsunagi' "$work/pkginfo"
|
|
bsdtar -tf "$output" | grep -qx 'usr/bin/tsng'
|
|
done
|
|
|
|
test "$(vercmp 1:0.1.0rc.9-1 0.1.0_rc.99-1)" -gt 0
|
|
test "$(vercmp 1:0.1.0rc.10-1 1:0.1.0rc.9-1)" -gt 0
|
|
test "$(vercmp 1:0.1.0-1 1:0.1.0rc.10-1)" -gt 0
|
|
|
|
output="$work/tsunagi-gui-0.1.0rc.10-1-x86_64.pkg.tar.zst"
|
|
bash "$here/build-pkg.sh" /usr/bin/true x86_64 0.1.0-rc.10 "$output" /usr/bin/true
|
|
bsdtar -xOf "$output" .PKGINFO > "$work/pkginfo"
|
|
grep -qx 'pkgname = tsunagi-gui' "$work/pkginfo"
|
|
grep -qx 'pkgver = 1:0.1.0rc.10-1' "$work/pkginfo"
|
|
grep -qx 'conflict = tsunagi' "$work/pkginfo"
|
|
bsdtar -tf "$output" | grep -qx 'usr/bin/tsunagi-tray'
|
|
echo 'Arch packaging and version-order checks passed'
|