Files
proton-drive-linux/packaging/aur/update.sh
nvrl ebeb9cdbef chore(aur): refresh -git pkgver in update.sh and bump to 2.2.0.r1.g82e9654
makepkg --printsrcinfo does not run pkgver(), so the -git .SRCINFO kept
the version from when the package was created and push.sh never had a
change to publish. update.sh now runs makepkg -od --noprepare first so
pkgver() writes the current git describe version into the PKGBUILD.
2026-09-24 19:49:42 +02:00

33 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Point the AUR packages at a new upstream release: rewrite pkgver, reset
# pkgrel, refresh the checksums that depend on the version, and regenerate
# every .SRCINFO.
#
# Usage: ./update.sh 1.12.0
set -euo pipefail
version="${1:-}"
if [[ -z $version ]]; then
echo "usage: ${0##*/} <version>" >&2
exit 2
fi
cd "$(dirname "$(readlink -f "$0")")"
# The -git package derives its pkgver from git describe, so only the two
# release-based packages are versioned here.
for pkg in proton-drive-for-linux proton-drive-for-linux-bin; do
sed -i -e "s/^pkgver=.*/pkgver=$version/" -e "s/^pkgrel=.*/pkgrel=1/" "$pkg/PKGBUILD"
(cd "$pkg" && updpkgsums)
done
# --printsrcinfo does not run pkgver(), so let makepkg clone the source and
# write the current git describe version back into the -git PKGBUILD first.
# --noprepare skips the cargo fetch in prepare().
(cd proton-drive-for-linux-git && makepkg -od --noprepare --noconfirm && rm -rf src)
for pkg in proton-drive-for-linux proton-drive-for-linux-git proton-drive-for-linux-bin; do
(cd "$pkg" && makepkg --printsrcinfo > .SRCINFO)
echo "updated $pkg"
done