diff options
author | Nicolai Schmid | 2020-05-19 22:17:04 +0200 |
---|---|---|
committer | Nicolai Schmid | 2020-05-19 22:34:49 +0200 |
commit | 2c4521ba67527fa1e2df85741605d7ad3ee9fe99 (patch) | |
tree | 05757be41e9392a4d6f5615ea9985314cdfab344 | |
parent | 2fc875199b140e87e257b7119eea145bf5ca941d (diff) | |
download | aur-2c4521ba67527fa1e2df85741605d7ad3ee9fe99.tar.gz |
chore: add update script for automated updates
-rwxr-xr-x | update.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/update.sh b/update.sh new file mode 100755 index 000000000000..07cef824d5d5 --- /dev/null +++ b/update.sh @@ -0,0 +1,18 @@ +VERSION=$(curl -s https://api.github.com/repos/buchen/portfolio/releases/latest | jq -r .tag_name) + +sed -i -e 's/pkgver=.*/pkgver='$VERSION'/' PKGBUILD + +updpkgsums + +# Check whether this changed anything +if (git diff --exit-code PKGBUILD); then + echo "Package ${PKG} has most recent version ${VER}" + exit 0 +fi + +# Update .SRCINFO +makepkg --printsrcinfo > .SRCINFO + +# Commit changes +git add PKGBUILD .SRCINFO +echo git commit -m "feat: update to v${VERSION}" |