diff --git a/.util.sh b/.util.sh index 95a7ac2..58910a9 100644 --- a/.util.sh +++ b/.util.sh @@ -1,5 +1,13 @@ #!/bin/sh +update_github_tag() { + local repo=$1 + + ver=`curl -s https://api.github.com/repos/${repo}/tags | jq -r '.[0].name' | cut -c2-` + echo $ver + sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD +} + update_pkg() { updpkgsums > /dev/null 2>&1 diff --git a/drone-runner-docker/update.sh b/drone-runner-docker/update.sh new file mode 100755 index 0000000..1b828c1 --- /dev/null +++ b/drone-runner-docker/update.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +source ../.util.sh + +update_github_tag drone-runners/drone-runner-docker + +update_pkg diff --git a/drone/update.sh b/drone/update.sh index a464a90..5023e30 100755 --- a/drone/update.sh +++ b/drone/update.sh @@ -2,8 +2,6 @@ source ../.util.sh -ver=`curl -s https://api.github.com/repos/drone/drone/tags | jq -r '.[0].name' | cut -c2-` -echo $ver -sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD +update_github_tag drone/drone update_pkg