mirror of
https://github.com/Felitendo/spotifast.git
synced 2026-11-01 17:33:26 +01:00
Publish canonical AUR, Homebrew and native package names while retaining existing application identities and updater-compatible archives. Announce the AUR move in packaging-only revisions of the old packages. Keep 0.8.0 application bytes unchanged. Cover both release filename sets in checksums and validate native Linux package replacement against pinned old-package fixtures.
36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Check source-recipe directory handling without recompiling the release.
|
|
set -euo pipefail
|
|
|
|
archive=$(realpath "${1:?usage: test-arch-source.sh SOURCE_ARCHIVE VERSION}")
|
|
version=${2:?release version is required}
|
|
recipe=$(dirname "$(realpath "$0")")/arch/spotifast/PKGBUILD.in
|
|
work=$(mktemp -d)
|
|
trap 'rm -rf "$work"' EXIT
|
|
mkdir "$work/src"
|
|
tar -xzf "$archive" -C "$work/src"
|
|
sed -e "s/@VERSION@/$version/g" -e 's/@PKGREL@/1/g' \
|
|
-e 's/@SOURCE_SHA256@/unused/g' "$recipe" > "$work/PKGBUILD"
|
|
|
|
srcdir="$work/src"
|
|
if [[ -d "$srcdir/spotifast-$version" ]]; then
|
|
expected="$srcdir/spotifast-$version"
|
|
else
|
|
expected="$srcdir/fastpotify-$version"
|
|
fi
|
|
test -f "$expected/Cargo.toml"
|
|
test -f "$expected/Cargo.lock"
|
|
|
|
# Exercise the real recipe phases; only the expensive Cargo subprocess is
|
|
# replaced. A wrong cd fails before this function, reproducing the 0.8.0 bug.
|
|
cargo() {
|
|
test "$PWD" = "$expected"
|
|
case "$1" in fetch|build|test) ;; *) return 1 ;; esac
|
|
}
|
|
# shellcheck source=/dev/null
|
|
source "$work/PKGBUILD"
|
|
prepare
|
|
build
|
|
check
|
|
printf 'Source recipe phases passed for %s\n' "$version"
|