diff --git a/.util.sh b/.util.sh index 97add44..5757404 100644 --- a/.util.sh +++ b/.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() { diff --git a/drone-runner-docker/update.sh b/drone-runner-docker/update.sh index 1b828c1..0602f85 100755 --- a/drone-runner-docker/update.sh +++ b/drone-runner-docker/update.sh @@ -4,4 +4,4 @@ source ../.util.sh update_github_tag drone-runners/drone-runner-docker -update_pkg +[ $? -eq 0 ] && update_pkg diff --git a/drone/update.sh b/drone/update.sh index 5023e30..d1154c1 100755 --- a/drone/update.sh +++ b/drone/update.sh @@ -4,4 +4,4 @@ source ../.util.sh update_github_tag drone/drone -update_pkg +[ $? -eq 0 ] && update_pkg diff --git a/k3s-bin/update.sh b/k3s-bin/update.sh index f0854ad..13a14d7 100755 --- a/k3s-bin/update.sh +++ b/k3s-bin/update.sh @@ -4,4 +4,4 @@ source ../.util.sh update_github_tag rancher/k3s -update_pkg +[ $? -eq 0 ] && update_pkg