-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump: add oras v1.2.0 to setup-oras #28
Conversation
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -106,5 +106,41 @@ | |||
"url": "https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_windows_amd64.zip" | |||
} | |||
} | |||
}, | |||
"1.2.0": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since ORAS v1.2.0 are also released to FreeBSD and Linux ppc64le, riscv64 and s390x. Please
- Add those new releases
- Add corresponding parsing logic from node OS (see possible platform and arch) to supported release of ORAS.
https://github.com/marketplace/actions/cross-platform-action#supported-platforms
Signed-off-by: Xiaoxuan Wang <[email protected]>
src/lib/data/releases.json
Outdated
"checksum": "054685703cb0c66e51f8143e3bbd3976e217d3d595f0593db43b6dd451e43329", | ||
"url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_armv7.tar.gz" | ||
}, | ||
"ppc64": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be ppc64le
to match golang arch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it matter? My understanding is that this value is an internal map key, and we can use any value for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to ppc64le
src/lib/release.ts
Outdated
return 'arm64'; | ||
return 'arm64'; | ||
case 'ppc64': | ||
return 'ppc64'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on above comment, should this be ppc64le
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to ppc64le
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have validated the #!/bin/bash
# Check if the correct number of arguments is given
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <checksum_file_path> <json_file_path>"
exit 1
fi
# Assign arguments to variables
checksum_file="$1"
json_file="$2"
# Read each line in the checksum file
while IFS= read -r line; do
# Extract the checksum, version, OS, and architecture from the line
read -r sum file <<<"$line"
# Split the file into VERSION, OS, and ARCH
IFS='_' read -r _ version os arch <<<"$file"
arch=${arch%%.*}
# Use jq to extract the checksum from the JSON file for the corresponding version, OS, and architecture
json_checksum=$(jq -r ".\"$version\".\"$os\".\"$arch\".checksum" "$json_file")
# Compare the checksums
if [ "$sum" == "$json_checksum" ]; then
echo "Checksum MATCH for $file"
else
echo "Checksum MISMATCH for $file"
fi
done <"$checksum_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves #29