diff --git a/versions.sh b/versions.sh index 5bfe73c46..62d4c4977 100755 --- a/versions.sh +++ b/versions.sh @@ -77,36 +77,36 @@ for version in "${versions[@]}"; do ascUrl="$url.asc" fi - variants='[]' - # order here controls the order of the library/ file - for suite in \ - trixie \ - bookworm \ - alpine3.23 \ - alpine3.22 \ - ; do - for variant in cli apache fpm zts; do - if [[ "$suite" = alpine* ]]; then - if [ "$variant" = 'apache' ]; then - continue - fi - fi - export suite variant - variants="$(jq <<<"$variants" -c '. + [ env.suite + "/" + env.variant ]')" - done - done - echo "$version: $fullVersion" export fullVersion url ascUrl sha256 json="$( - jq <<<"$json" -c --argjson variants "$variants" ' + jq <<<"$json" -c ' .[env.version] = { version: env.fullVersion, url: env.url, ascUrl: env.ascUrl, sha256: env.sha256, - variants: $variants, + variants: [ + # order here controls the order of the library/ file + ( + "trixie", + "bookworm", + "alpine3.23", + "alpine3.22", + empty + ) as $suite + | ( + "cli", + "apache", + "fpm", + "zts", + empty + ) as $variant + | if $suite | startswith("alpine") and $variant == "apache" then empty else + "\($suite)/\($variant)" + end + ], } ' )"