Skip to content
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

Merged
merged 7 commits into from
Jun 6, 2024
Merged

bump: add oras v1.2.0 to setup-oras #28

merged 7 commits into from
Jun 6, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Jun 5, 2024

Resolves #29

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]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a 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": {
Copy link
Contributor

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

  1. Add those new releases
  2. 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]>
"checksum": "054685703cb0c66e51f8143e3bbd3976e217d3d595f0593db43b6dd451e43329",
"url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_armv7.tar.gz"
},
"ppc64": {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to ppc64le

return 'arm64';
return 'arm64';
case 'ppc64':
return 'ppc64';
Copy link
Contributor

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?

Copy link
Contributor Author

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]>
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qweeah
Copy link
Contributor

qweeah commented Jun 6, 2024

I have validated the release.json using below script based on v1.2.0 checksum

#!/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"

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shizhMSFT shizhMSFT merged commit 339758d into oras-project:main Jun 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can not setup oras 1.2.0
3 participants