Skip to content

Commit

Permalink
add comment about wishing to use $binary_bucket_region
Browse files Browse the repository at this point in the history
instead of hardcoding us-west-2
  • Loading branch information
joelddiaz committed Apr 1, 2024
1 parent a733644 commit 9466e72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hack/latest-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ MINOR_VERSION="${1}"

# retrieve the available "VERSION/BUILD_DATE" prefixes (e.g. "1.28.1/2023-09-14")
# from the binary object keys, sorted in descending semver order, and pick the first one
# TODO: ideally we want to use the value of $binary_bucket_region instead of hard-coding us-west-2
# since setting the binary_bucket_region value really is the indication of where the binaries are located.
LATEST_BINARIES=$(aws s3api list-objects-v2 --bucket amazon-eks --prefix "${MINOR_VERSION}" --query 'Contents[*].[Key]' --output text --region us-west-2 --no-sign-request | cut -d'/' -f-2 | sort -Vru | head -n1)

if [ "${LATEST_BINARIES}" == "None" ]; then
Expand Down

0 comments on commit 9466e72

Please sign in to comment.