mirror of https://github.com/built-aur/packages
fix(auto-update): enable auto update for `mangohud`
This commit is contained in:
parent
0a7e304b8f
commit
9de46f0e62
|
@ -1,2 +1,3 @@
|
|||
AUR_NAME="mangohud"
|
||||
AUR_UPDATED="null"
|
||||
AUR_PKGBASE=true
|
||||
AUR_UPDATED="24f171aa7a3a8ac97a601c990d45e12b2e33cf66"
|
||||
|
|
|
@ -25,9 +25,16 @@ update-package() {
|
|||
then
|
||||
if [ -n "${AUR_NAME}" ]
|
||||
then
|
||||
local version="${AUR_UPDATED}"
|
||||
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}"
|
||||
|
||||
if [[ -z "${last_updated}" || "${last_updated}" = "null" ]]
|
||||
then
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue