k3s: skip pre-releases in update script
This commit is contained in:
parent
0b868df4ce
commit
9ca7c0dd16
1 changed files with 3 additions and 1 deletions
|
@ -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//')
|
||||
|
|
Loading…
Reference in a new issue