From 8c9dfd004e2c971a25d1fe1df73fbef374e4cc66 Mon Sep 17 00:00:00 2001 From: Florian Kinder Date: Fri, 1 Nov 2024 17:50:52 +0100 Subject: [PATCH] Use stable_online_version instead of stableOnlineVersionShort This hopefully causes the stable tag to not be removed anymore for an unknown reason. --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index c5e9658..78f0536 100755 --- a/update.sh +++ b/update.sh @@ -73,8 +73,8 @@ rm -f -- "$tmpfile" # Update tag by stable cp buildinfo.json "$tmpfile" -if [[ $stableOnlineVersionShort == "$stableCurrentVersionShort" ]]; then - jq --arg stable_current_version "$stable_current_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$stable_sha256" 'with_entries(if .key == $stable_current_version then .key |= $stable_online_version | .value.sha256 |= $sha256 | .value.tags |= . - [$stable_current_version] + [$stable_online_version] else . end)' "$tmpfile" > buildinfo.json +if [[ "$stable_online_version" == "$stable_current_version" ]]; then + jq --arg stable_current_version "$stable_current_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$stable_sha256" 'with_entries(if .key == $stable_current_version then .key |= $stable_online_version | .value.sha256 |= $sha256 | .value.tags |= . - [$stable_current_version] + [$stable_online_version, "stable"] else . end)' "$tmpfile" > buildinfo.json else jq --arg stable_current_version "$stable_current_version" --arg stable_online_version "$stable_online_version" --arg sha256 "$stable_sha256" --arg stableOnlineVersionShort "$stableOnlineVersionShort" --arg stableOnlineVersionMajor "$stableOnlineVersionMajor" 'with_entries(if .key == $stable_current_version then .value.tags |= . - ["latest","stable",$stableOnlineVersionMajor] else . end) | to_entries | . + [{ key: $stable_online_version, value: { sha256: $sha256, tags: ["latest","stable",("stable-" + $stable_online_version),$stableOnlineVersionMajor,$stableOnlineVersionShort,$stable_online_version]}}] | from_entries' "$tmpfile" > buildinfo.json fi