From 943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 23 Apr 2023 16:35:49 +0200 Subject: ci: reuse script to enable Developer Command Prompt --- .github/scripts/env.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/scripts/env.ps1 (limited to '.github/scripts') diff --git a/.github/scripts/env.ps1 b/.github/scripts/env.ps1 new file mode 100644 index 0000000000..d1dba5d558 --- /dev/null +++ b/.github/scripts/env.ps1 @@ -0,0 +1,9 @@ +# This script enables Developer Command Prompt +# See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell +$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath +if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) { + & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object { + $name, $value = $_ -split '=', 2 + "$name=$value" >> $env:GITHUB_ENV + } +} -- cgit