Add HOMEBREW_MACOS_NEWEST_SUPPORTED env var #20112
Merged
+7
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?We have a
HOMEBREW_MACOS_NEWEST_UNSUPPORTED
environment variable and this is used inMacOSVersion
to determine prerelease versions but we don't have a way of easily determining the newest supported macOS version.bump-cask-pr
contains logic that assumes the first key/value inMacOSVersion::SYMBOLS
is the newest macOS version but it recently became clear that this is a prerelease version between WWDC and the subsequent macOS release. Similarly,dev-cmd/generate-cask-api.rb
tries to compute the newest stable macOS version asHOMEBREW_MACOS_NEWEST_UNSUPPORTED.to_i - 1
and this will fail if/when we update that variable to"26"
, as the macOS version before 26 is 15, not 25.This adds a
HOMEBREW_MACOS_NEWEST_SUPPORTED
environment variable, so we have a straightforward way of quickly identifying the newest supported macOS version without having to make potentially unreliable assumptions or do computations to identify the latest non-prereleaseMacOSVersion
value. This also updates the two aforementioned areas to use this environment variable to produce the newest stable macOS version symbol in a more reliable way.Partly related to discussion about not relying on
MacOSVersion::SYMBOL
order in #20108