diff options
author | Brad King <brad.king@kitware.com> | 2022-09-12 16:29:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-12 16:42:25 (GMT) |
commit | 906b1a0bc4b8cb04e9eb879c26a4a5e3a7297fc9 (patch) | |
tree | 6dd388d8adb5012176c2e300de2443471caa33bd /.gitlab/ci | |
parent | 6183332c27638a0990f0ee7fe6a088e0cadeca19 (diff) | |
download | CMake-906b1a0bc4b8cb04e9eb879c26a4a5e3a7297fc9.zip CMake-906b1a0bc4b8cb04e9eb879c26a4a5e3a7297fc9.tar.gz CMake-906b1a0bc4b8cb04e9eb879c26a4a5e3a7297fc9.tar.bz2 |
ci: allow powershell variables assigned in env scripts to persist
Load env scripts with `.` sourcing instead of `Invoke-Expression`.
This allows powershell variables to persist, much like bash.
Leave helper script loading unchanged, as those scripts may set
powershell variables that we do not want to persist.
Diffstat (limited to '.gitlab/ci')
-rwxr-xr-x | .gitlab/ci/env.ps1 | 2 | ||||
-rwxr-xr-x | .gitlab/ci/env_windows_vs2022_x64_ninja.ps1 | 2 | ||||
-rwxr-xr-x | .gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/.gitlab/ci/env.ps1 b/.gitlab/ci/env.ps1 index e24bc37..aa7753f 100755 --- a/.gitlab/ci/env.ps1 +++ b/.gitlab/ci/env.ps1 @@ -1,3 +1,3 @@ if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) { - Invoke-Expression ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" + . ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" } diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 index f8a86c4..a96658d 100755 --- a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 +++ b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 @@ -1,3 +1,3 @@ if ("$env:CMAKE_CI_NIGHTLY" -eq "true") { - Invoke-Expression ".gitlab/ci/ispc-env.ps1" + . ".gitlab/ci/ispc-env.ps1" } diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 index e8d242c..f245319 100755 --- a/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 +++ b/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 @@ -1,5 +1,5 @@ if ("$env:CMAKE_CI_NIGHTLY" -eq "true") { - Invoke-Expression -Command ".gitlab/ci/ispc-env.ps1" + . ".gitlab/ci/ispc-env.ps1" } $pwdpath = $pwd.Path |