Add support for macos-12

This commit is contained in:
Benoit Daloze
2022-05-16 12:08:36 +02:00
parent b9675e15ad
commit a7439cf424
4 changed files with 17 additions and 7 deletions
Generated Vendored
+7 -2
View File
@@ -372,7 +372,8 @@ const supportedPlatforms = [
'ubuntu-20.04',
'ubuntu-22.04',
'macos-10.15',
'macos-11.0',
'macos-11',
'macos-12',
'windows-2019',
'windows-2022',
]
@@ -387,7 +388,11 @@ function getVirtualEnvironmentName() {
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
if (match) {
return `macos-${match[1]}.${match[2] || '0'}`
if (match[2]) {
return `macos-${match[1]}.${match[2]}`
} else {
return `macos-${match[1]}`
}
}
match = imageOS.match(/^win(\d+)/) // e.g. win19