aur/.util.sh
nyyu 499d3c7060
All checks were successful
continuous-integration/drone/push Build is passing
fix(autoupdate): exclude dev
2022-01-15 14:40:47 +01:00

26 lines
624 B
Bash

#!/bin/sh
update_github_tag() {
local repo=$1
ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-`
echo "$ver" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
}
update_pkg() {
updpkgsums
if [ $? -eq 0 ]
then
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO PKGBUILD
git commit -m "$(basename $(pwd)): update to $ver [CI SKIP]"
if [ $? -eq 0 ]
then
git push --set-upstream origin $DRONE_SOURCE_BRANCH
fi
fi
}