k3s: add auto update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nyyu 2021-07-26 20:42:58 +02:00
parent 5d371d0885
commit 231f368968
2 changed files with 8 additions and 1 deletions

View file

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

7
k3s-bin/update.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
source ../.util.sh
update_github_tag rancher/k3s
update_pkg