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

Fix MacOS version detection #1546

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion buildkite/bazelci.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,8 @@ def execute_commands(


def get_default_xcode_version():
macos, _, _ = platform_module.mac_ver()
# Cannot use platform.mac_ver() since it returns 10.16 on both 12.x and 13.x
macos = execute_command_and_get_output(["sw_vers", "-productVersion"], print_output=False)
major = int(macos.split(".")[0])
return DEFAULT_XCODE_VERSION_PER_OS.get(major, "13.0") # we use 13.0 due to legacy reasons

Expand Down