From 5a8bf0a14461c35cb2034020ea553452aceaf96b Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Wed, 24 Aug 2022 14:30:46 -0700 Subject: [PATCH 1/2] Simpler get-binarysizes check for OSX --- eng/scripts/Get-BinarySizes.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/scripts/Get-BinarySizes.ps1 b/eng/scripts/Get-BinarySizes.ps1 index 1cc164e4ee..ca750768b8 100644 --- a/eng/scripts/Get-BinarySizes.ps1 +++ b/eng/scripts/Get-BinarySizes.ps1 @@ -41,7 +41,7 @@ function setEnvVar($key, $value) { } function getTargetOs { - if ($OsVMImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OsVMImage -like 'macOS') { return $OsVMImage } @@ -64,7 +64,7 @@ function getTargetOs { } function getTargetArchitecture { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS') { return "x64" } @@ -81,7 +81,7 @@ function getTargetArchitecture { } function getToolChain { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS') { return "AppleClang 12" } @@ -109,7 +109,7 @@ function getToolChain { } function getTargetPlatform { - if ($OSVmImage.StartsWith('macOS', $true, (Get-Culture).InvariantCulture)) { + if ($OSVmImage -like 'macOS') { return "macos" } From 32c9c73c0ae3de85e2b11a65e3fce522c52469e3 Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Wed, 24 Aug 2022 14:57:23 -0700 Subject: [PATCH 2/2] Missed wildcard --- eng/scripts/Get-BinarySizes.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eng/scripts/Get-BinarySizes.ps1 b/eng/scripts/Get-BinarySizes.ps1 index ca750768b8..bbe5be472f 100644 --- a/eng/scripts/Get-BinarySizes.ps1 +++ b/eng/scripts/Get-BinarySizes.ps1 @@ -41,7 +41,7 @@ function setEnvVar($key, $value) { } function getTargetOs { - if ($OsVMImage -like 'macOS') { + if ($OsVMImage -like 'macOS*') { return $OsVMImage } @@ -64,7 +64,7 @@ function getTargetOs { } function getTargetArchitecture { - if ($OSVmImage -like 'macOS') { + if ($OSVmImage -like 'macOS*') { return "x64" } @@ -81,7 +81,7 @@ function getTargetArchitecture { } function getToolChain { - if ($OSVmImage -like 'macOS') { + if ($OSVmImage -like 'macOS*') { return "AppleClang 12" } @@ -109,7 +109,7 @@ function getToolChain { } function getTargetPlatform { - if ($OSVmImage -like 'macOS') { + if ($OSVmImage -like 'macOS*') { return "macos" }