update only if valid ver [CI SKIP]
This commit is contained in:
parent
2883c0d3d2
commit
7d83dd9553
3
.util.sh
3
.util.sh
@ -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() {
|
||||
|
@ -4,4 +4,4 @@ source ../.util.sh
|
||||
|
||||
update_github_tag drone-runners/drone-runner-docker
|
||||
|
||||
update_pkg
|
||||
[ $? -eq 0 ] && update_pkg
|
||||
|
@ -4,4 +4,4 @@ source ../.util.sh
|
||||
|
||||
update_github_tag drone/drone
|
||||
|
||||
update_pkg
|
||||
[ $? -eq 0 ] && update_pkg
|
||||
|
@ -4,4 +4,4 @@ source ../.util.sh
|
||||
|
||||
update_github_tag rancher/k3s
|
||||
|
||||
update_pkg
|
||||
[ $? -eq 0 ] && update_pkg
|
||||
|
Loading…
Reference in New Issue
Block a user