recognize macOS 11.1 as big sur (#20038)

Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that
only used the minor component)

Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
This commit is contained in:
Martin Aumüller 2020-11-23 08:37:40 +01:00 committed by GitHub
parent 92d540fde7
commit b490d65f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,10 +55,14 @@ def __init__(self):
'10.14': 'mojave',
'10.15': 'catalina',
'10.16': 'bigsur',
'11.0': 'bigsur',
'11': 'bigsur',
}
mac_ver = str(macos_version().up_to(2))
# Big Sur versions go 11.0, 11.0.1, 11.1 (vs. prior versions that
# only used the minor component)
part = 1 if macos_version() >= Version('11') else 2
mac_ver = str(macos_version().up_to(part))
name = mac_releases.get(mac_ver, "macos")
super(MacOs, self).__init__(name, mac_ver)