update only if valid ver [CI SKIP]

This commit is contained in:
nyyu 2021-08-25 18:54:27 +02:00
parent 2883c0d3d2
commit 7d83dd9553
4 changed files with 4 additions and 5 deletions

View File

@ -4,8 +4,7 @@ update_github_tag() {
local repo=$1
ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '.[0].name' | cut -c2-`
echo $ver
sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
echo "$ver" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
}
update_pkg() {

View File

@ -4,4 +4,4 @@ source ../.util.sh
update_github_tag drone-runners/drone-runner-docker
update_pkg
[ $? -eq 0 ] && update_pkg

View File

@ -4,4 +4,4 @@ source ../.util.sh
update_github_tag drone/drone
update_pkg
[ $? -eq 0 ] && update_pkg

View File

@ -4,4 +4,4 @@ source ../.util.sh
update_github_tag rancher/k3s
update_pkg
[ $? -eq 0 ] && update_pkg