Skip to content

Commit

Permalink
Update compose-scraping logic to match buildx (especially to ignore p…
Browse files Browse the repository at this point in the history
…rovenance.json)
  • Loading branch information
tianon committed Jan 8, 2025
1 parent 982bc8b commit 13c485a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ for composeVersion in $composeVersions; do
file: .[1],
url: ("https://github.com/docker/compose/releases/download/v" + $version + "/" + .[1]),
}
| select(.file | test("[.]json$") | not)
| { (
.file
| ltrimstr("docker-compose-")
| rtrimstr(".exe")
| split("-")
| if .[0] == "linux" then "" else .[0] + "-" end
| capture("-(?<os>linux|windows|darwin|freebsd|openbsd)-(?<arch>[^.]+)(?<ext>[.]exe)?$")
// error("failed to parse os-arch from filename: " + .)
| if .os == "linux" then "" else .os + "-" end
+ ({
aarch64: "arm64v8",
armv6: "arm32v6",
Expand All @@ -166,7 +166,7 @@ for composeVersion in $composeVersions; do
riscv64: "riscv64",
s390x: "s390x",
x86_64: "amd64",
}[.[1]] // error("unknown compose architecture: " + .[1]))
}[.arch] // error("unknown compose architecture: " + .arch))
): . }
)
| add
Expand Down

0 comments on commit 13c485a

Please sign in to comment.