mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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.
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
|
||||
Invoke-Expression ".gitlab/ci/ispc-env.ps1"
|
||||
. ".gitlab/ci/ispc-env.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
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
## Windows-specific scripts
|
||||
|
||||
.before_script_windows: &before_script_windows
|
||||
- Invoke-Expression -Command .gitlab/ci/env.ps1
|
||||
- . .gitlab/ci/env.ps1
|
||||
- $pwdpath = $pwd.Path
|
||||
- powershell -File ".gitlab/ci/wix.ps1"
|
||||
- Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix"
|
||||
@@ -352,7 +352,7 @@
|
||||
stage: test-ext
|
||||
|
||||
script:
|
||||
- Invoke-Expression -Command .gitlab/ci/env.ps1
|
||||
- . .gitlab/ci/env.ps1
|
||||
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
|
||||
|
||||
interruptible: true
|
||||
|
||||
Reference in New Issue
Block a user