summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Endfinger2020-01-13 20:04:53 -0500
committerKenneth Endfinger2020-01-13 20:04:53 -0500
commit67932a5aeb0b836ee13d3060291dce8b3898e27e (patch)
treefccf654fc4cfcb8baead94dc11954b13e96a3d78
parent5025082d6dc7f1984cbbb3f3d0c26a240853a1d5 (diff)
downloadaur-67932a5aeb0b836ee13d3060291dce8b3898e27e.tar.gz
Add check-for-update script.
-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..49d87935ab2
--- /dev/null
+++ b/check-for-update.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+set -e
+
+cd $(dirname "${0}")
+
+REPOSITORY="moby/buildkit"
+
+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}/releases/latest" | jq -r '.tag_name' | 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