diff --git a/.util.sh b/.util.sh index 1f53765..8452054 100644 --- a/.util.sh +++ b/.util.sh @@ -1,7 +1,7 @@ #!/bin/bash update_github_tag() { - local ver=$(curl -Ls https://api.github.com/repos/"$1"/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-) + local ver=$(curl -Ls https://api.github.com/repos/"$1"/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not) | select (.name | index("beta") | not)] | first | .name' | sed 's/^v//') echo "${ver}" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD }