diff --git a/packages/mangohud/built.conf b/packages/mangohud/built.conf index 14a461f1..59d1a369 100644 --- a/packages/mangohud/built.conf +++ b/packages/mangohud/built.conf @@ -1,2 +1,3 @@ AUR_NAME="mangohud" -AUR_UPDATED="null" +AUR_PKGBASE=true +AUR_UPDATED="24f171aa7a3a8ac97a601c990d45e12b2e33cf66" diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index 4d798251..fe95784f 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -25,9 +25,16 @@ update-package() { then if [ -n "${AUR_NAME}" ] then + if [ -n "${AUR_PKGBASE}" ] + then + local latest_version="latest" + local last_updated="$(git ls-remote --quiet https://aur.archlinux.org/${AUR_NAME}.git refs/heads/master | awk '{print $1}')" + else + local latest_version="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].Version')" + local last_updated="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].LastModified')" + fi + local version="${AUR_UPDATED}" - local latest_version="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].Version')" - local last_updated="$(curl --location --silent "https://aur.archlinux.org/rpc/?v=5&type=info&arg=${AUR_NAME}" | jq -r '.results[0].LastModified')" if [[ -z "${last_updated}" || "${last_updated}" = "null" ]] then diff --git a/scripts/lib/parse-conf.sh b/scripts/lib/parse-conf.sh index 7e19dd86..c2ddc6e0 100755 --- a/scripts/lib/parse-conf.sh +++ b/scripts/lib/parse-conf.sh @@ -4,6 +4,7 @@ parse-conf() { . "${1}/built.conf" echo "local AUR_NAME=${AUR_NAME}" + echo "local AUR_PKGBASE=${AUR_PKGBASE}" echo "local AUR_UPDATED=${AUR_UPDATED}" echo "local GITHUB_REPO=${GITHUB_REPO}" echo "local GITHUB_TAG=${GITHUB_TAG}"