From 9ca7c0dd160b22f3de52c93d1f8e1da06a91105a Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:34:51 -0300 Subject: [PATCH] k3s: skip pre-releases in update script --- pkgs/applications/networking/cluster/k3s/update-script.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/k3s/update-script.sh b/pkgs/applications/networking/cluster/k3s/update-script.sh index 19b0a6d9309e..9f534f4d179a 100755 --- a/pkgs/applications/networking/cluster/k3s/update-script.sh +++ b/pkgs/applications/networking/cluster/k3s/update-script.sh @@ -19,7 +19,9 @@ LATEST_TAG_RAWFILE=${WORKDIR}/latest_tag.json curl --silent -f ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ https://api.github.com/repos/k3s-io/k3s/releases > ${LATEST_TAG_RAWFILE} -LATEST_TAG_NAME=$(jq 'map(.tag_name)' ${LATEST_TAG_RAWFILE} | \ +LATEST_TAG_NAME=$(cat ${LATEST_TAG_RAWFILE} | \ + jq -r 'map(select(.prerelease == false))' | \ + jq 'map(.tag_name)' | \ grep -v -e rc -e engine | tail -n +2 | head -n -1 | sed 's|[", ]||g' | sort -rV | grep -E "^v1\.${MINOR_VERSION}\." | head -n1) K3S_VERSION=$(echo ${LATEST_TAG_NAME} | sed 's/^v//')