Fix pkgver issue, thanks user @feel for the report

Reported-by: Filippo Squillace <feel dot sqoox at gmail dot com>
This commit is contained in:
Claudia Pellegrino 2022-05-22 21:33:13 +02:00
parent 9a4c93e60e
commit eba1123ea0
No known key found for this signature in database
GPG key ID: 7AA67DE7B73139CE
4 changed files with 25 additions and 8 deletions

View file

@ -1,7 +1,7 @@
pkgbase = playdate-sdk
pkgdesc = SDK for the Playdate console with Lua and C APIs, docs, and a simulator
pkgver = 1.11.0
pkgrel = 1
pkgrel = 2
url = https://play.date/dev/
install = playdate-sdk.install
arch = any

View file

@ -18,3 +18,7 @@ trim_trailing_whitespace = false
[PKGBUILD]
indent_size = 2
[*.sh]
end_of_line = lf
indent_size = 2

View file

@ -2,7 +2,7 @@
pkgname=playdate-sdk
pkgver=1.11.0
pkgrel=1
pkgrel=2
pkgdesc='SDK for the Playdate console with Lua and C APIs, docs, and a simulator'
arch=('any')
url='https://play.date/dev/'
@ -40,12 +40,6 @@ prepare() {
--strip-components=1
}
pkgver() {
curl -s -o /dev/null -w '%{json}' "${_url_base}-latest.tar.gz" \
| jq -r '.redirect_url' \
| sed -E 's/.*SDK-(.*)\.tar\.gz/\1/'
}
package() {
mkdir -p \
"${pkgdir}/etc/profile.d" \

19
check-for-update.sh Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -eu -o pipefail
cd "$(dirname "${0}")"
source PKGBUILD
_latest="$(
curl -s -o /dev/null -w '%{json}' "${_url_base}-latest.tar.gz" \
| jq -r '.redirect_url' \
| sed -E 's/.*SDK-(.*)\.tar\.gz/\1/'
)"
if [ "${_latest}" != "${pkgver}" ]
then
echo >&2 "${pkgname}: AUR ${pkgver} != upstream ${_latest}"
exit 1
fi
echo >&2 "${pkgname}: AUR ${pkgver} == upstream ${_latest}"