Procházet zdrojové kódy

Merge topic 'ci-windows-tmpdir'

f51d809b44 ci: Place temporary files inside job directory on Windows

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9272
Brad King před 1 rokem
rodič
revize
62feb76394
2 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 1 0
      .gitlab/.gitignore
  2. 8 0
      .gitlab/ci/env.ps1

+ 1 - 0
.gitlab/.gitignore

@@ -18,6 +18,7 @@
 /sccache*
 /swift
 /ticlang
+/tmp
 /unstable-jom*
 /watcom
 /wix*

+ 8 - 0
.gitlab/ci/env.ps1

@@ -1,4 +1,12 @@
 $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
+
+# Place temporary files inside job directory.
+$tmp = New-Item -Force -ItemType Directory -Path "$pwd\.gitlab\tmp"
+$tmp = (New-Object -ComObject Scripting.FileSystemObject).GetFolder("$tmp").ShortPath
+Set-Item -Force -Path "env:TEMP" -Value "$tmp"
+Set-Item -Force -Path "env:TMP"  -Value "$tmp"
+$tmp = $null
+
 if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) {
   . ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1"
 }