Files
spotifast/packaging/test-arch-source.sh
T
Carmine Paolino 16a9dde2ca Drop the old name from packages, release scripts and docs
Packages no longer install a fastpotify command or declare that they
replace, provide or conflict with the old packages. Releases no longer
carry the 0.9.1 bridge files, the release script only checks and sums
Spotifast downloads, and the Flatpak, Homebrew, macOS and Windows
recipes lose their old-identity branches and clean-ups. Packaging CI
tests the v0.11.2 release instead of installing the 0.8.0 package first.
The Rename page and the notes pointing to it are gone.

Updates begun by 0.10.2 or earlier on Windows relaunch fastpotify.exe,
which the installer no longer provides; such an install updates, but
needs starting by hand once.
2026-10-03 14:18:23 +02:00

32 lines
1012 B
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"
expected="$srcdir/spotifast-$version"
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"