aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2021-12-16 11:06:08 +0100
committerOliver Wolff <oliver.wolff@qt.io>2022-11-10 06:49:29 +0000
commit37f4d821b82b69e693cd460aecd5b06995be0e44 (patch)
tree8ef46c006e42a330f109a7d5032fd7102c991317
parenta523008ed48c11c7e2898c65520cdaf1dbd1b28f (diff)
provisioning: Make sure that MSVC 2019 version is added to versions.txt
If MSVC 2022 is installed in CI machines, vswhere -latest without any additional version information will return the latest version of 2022. By limiting the version range (>=16, <17) we make sure that only the latest version of MSVC 2019 is returned. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I8f92099f030660c1914ffb728efc9a55eadf4808 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
-rw-r--r--coin/provisioning/common/windows/update-msvc2019.ps13
1 files changed, 2 insertions, 1 deletions
diff --git a/coin/provisioning/common/windows/update-msvc2019.ps1 b/coin/provisioning/common/windows/update-msvc2019.ps1
index 78c4bc85..6a4615ec 100644
--- a/coin/provisioning/common/windows/update-msvc2019.ps1
+++ b/coin/provisioning/common/windows/update-msvc2019.ps1
@@ -74,7 +74,8 @@ function Install {
Install $urlOfficial_vsInstaller $urlCache_vsInstaller $sha1_vsInstaller
Install $urlOfficial_buildToolsInstaller $urlCache_buildToolsInstaller $sha1_buildToolsInstaller
-$msvc2019Version = (cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property catalog_productDisplayVersion 2`>`&1)
+$msvc2019Version = (cmd /c "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" `
+ -version [16.0,17.0`) -latest -property catalog_productDisplayVersion 2`>`&1)
Write-Output "Visual Studio 2019 = $msvc2019Version" >> ~\versions.txt
Write-Output "Visual Studio 2019 Build Tools = $version" >> ~\versions.txt