diff options
Diffstat (limited to 'update.sh')
-rw-r--r-- | update.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/update.sh b/update.sh new file mode 100644 index 000000000000..dd15e063e9c1 --- /dev/null +++ b/update.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -xe + +source ./PKGBUILD + +GITLAB_USER="azelpg" +PROJECT_ID=$(curl "https://gitlab.com/api/v4/users/${GITLAB_USER}/projects" | jq '.[] | select(.path == "'"${pkgname}"'") | .id') +LATEST_RELEASE=$(curl "https://gitlab.com/api/v4/projects/${PROJECT_ID}/releases" | jq -r '.[0].tag_name' | sed 's/^v//') + +sed -i 's/pkgver=.*/pkgver='"${LATEST_RELEASE}"'/' PKGBUILD +updpkgsums |