diff --git a/.SRCINFO b/.SRCINFO index 8d5759c979f4..2501a0212170 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -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 diff --git a/.editorconfig b/.editorconfig index cf06dd3ed5ab..4d03d8c669dc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,3 +18,7 @@ trim_trailing_whitespace = false [PKGBUILD] indent_size = 2 + +[*.sh] +end_of_line = lf +indent_size = 2 diff --git a/PKGBUILD b/PKGBUILD index a6cac26e7f03..3f481176c940 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -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" \ diff --git a/check-for-update.sh b/check-for-update.sh new file mode 100755 index 000000000000..a3343e5ef306 --- /dev/null +++ b/check-for-update.sh @@ -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}"