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

fetch binary built for oldest macOS version #51

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

kenjenkins
Copy link
Contributor

It looks like Homebrew builds binaries for the three latest versions of macOS (for both amd64 and arm64). Currently it looks like the fetch-envoy script may end up downloading any one of the three available binaries for a specific architecture.

Let's update this script so that it will choose the binary built for the oldest available macOS version, as that should provide the widest compatibility. We can do this by first fetching the multi-platform manifest, filtering by OS and architecture, and then finding the minimum OS version.

(Note that the OS version is a text string like "macOS 12.6". Comparing these strings may not be totally correct in general, but I think it should give a correct result while the major version still has two digits.)

It looks like Homebrew builds binaries for the three latest versions of
macOS (for both amd64 and arm64). Currently it looks like the
fetch-envoy script may end up downloading any one of the three available
binaries for a specific architecture.

Let's update this script so that it will choose the binary built for the
oldest available macOS version, as that should provide the widest
compatibility. We can do this by first fetching the multi-platform
manifest, filtering by OS and architecture, and then finding the minimum
OS version.

(Note that the OS version is a text string like "macOS 12.6". Comparing
these strings may not be totally correct in general, but I think it
should give a correct result while the major version still has two
digits.)
@kenjenkins kenjenkins requested a review from a team as a code owner October 23, 2023 22:24
@kenjenkins kenjenkins requested review from calebdoxsey and removed request for a team October 23, 2023 22:24
(
cd "$_tmp_dir"
_digest=$(oras manifest fetch "ghcr.io/homebrew/core/envoy:${_version}" |
jq -r ".manifests |
Copy link
Contributor

Choose a reason for hiding this comment

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

Is jq available in the default tools for action runner ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kenjenkins kenjenkins merged commit f76b1d0 into main Oct 24, 2023
1 check passed
@kenjenkins kenjenkins deleted the kenjenkins/min-os-version branch October 24, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants