summarylogtreecommitdiffstats
path: root/check-for-update.sh
diff options
context:
space:
mode:
authorKenneth Endfinger2020-01-15 15:06:11 -0500
committerKenneth Endfinger2020-01-15 15:06:11 -0500
commit01e76358708aa07df595813a744b837f2eb89ef8 (patch)
tree831a060b0781a2820b3140f52ee1ddcb597908b8 /check-for-update.sh
parent590e302821b8b8d7260cb363a3329fb66c3b3e04 (diff)
downloadaur-01e76358708aa07df595813a744b837f2eb89ef8.tar.gz
v2.2.0
Diffstat (limited to 'check-for-update.sh')
-rwxr-xr-xcheck-for-update.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/check-for-update.sh b/check-for-update.sh
new file mode 100755
index 00000000000..5406423ad97
--- /dev/null
+++ b/check-for-update.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+set -e
+
+cd $(dirname "${0}")
+
+REPOSITORY="ui/django-rq"
+
+PKG=$(cat .SRCINFO | grep "pkgbase" | head -n1 | awk '{print $3}')
+CURRENT=$(cat .SRCINFO | grep "pkgver" | head -n1 | awk '{print $3}')
+LATEST=$(curl --silent -L "https://api.github.com/repos/${REPOSITORY}/tags" | jq -r '.[].name' | grep -v -- "-" | head -n1 | sed 's/v//g')
+if [ "${LATEST}" != "${CURRENT}" ]
+then
+ echo "${PKG} : AUR ${CURRENT} != GitHub ${LATEST}"
+ exit 1
+fi
+echo "${PKG} : AUR ${CURRENT} == GitHub ${LATEST}"
+exit 0