diff options
author | superherointj <5861043+superherointj@users.noreply.github.com> | 2024-03-15 10:40:46 -0300 |
---|---|---|
committer | superherointj <5861043+superherointj@users.noreply.github.com> | 2024-03-15 10:48:03 -0300 |
commit | 717a342253000d1d9bd6ce0458ae6d9ee9751f1b (patch) | |
tree | 8499c8d4e1ae460a0c1b7261dd3d9297560399ec /pkgs/applications/networking/cluster/k3s | |
parent | 99f728d5360c691b40c091b262857e68f139bf29 (diff) | |
download | nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar.gz nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar.bz2 nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar.lz nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar.xz nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.tar.zst nixlib-717a342253000d1d9bd6ce0458ae6d9ee9751f1b.zip |
k3s: fix update script for 1.26, 1.27 versions
Fixes previous code not listing all tag versions and failing to pick the latest version.
Diffstat (limited to 'pkgs/applications/networking/cluster/k3s')
-rwxr-xr-x | pkgs/applications/networking/cluster/k3s/update-script.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/applications/networking/cluster/k3s/update-script.sh b/pkgs/applications/networking/cluster/k3s/update-script.sh index dc41d7325b6c..19b0a6d9309e 100755 --- a/pkgs/applications/networking/cluster/k3s/update-script.sh +++ b/pkgs/applications/networking/cluster/k3s/update-script.sh @@ -25,8 +25,8 @@ LATEST_TAG_NAME=$(jq 'map(.tag_name)' ${LATEST_TAG_RAWFILE} | \ K3S_VERSION=$(echo ${LATEST_TAG_NAME} | sed 's/^v//') K3S_COMMIT=$(curl --silent -f ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ - https://api.github.com/repos/k3s-io/k3s/tags \ - | jq -r "map(select(.name == \"${LATEST_TAG_NAME}\")) | .[0] | .commit.sha") + https://api.github.com/repos/k3s-io/k3s/git/refs/tags \ + | jq -r "map(select(.ref == \"refs/tags/${LATEST_TAG_NAME}\")) | .[0] | .object.sha") K3S_REPO_SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/k3s-io/k3s/archive/refs/tags/${LATEST_TAG_NAME}.tar.gz) |