From 35148933fc88e1aa2eede7f4c969771705dc15b9 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 1 Apr 2019 22:30:16 +0100 Subject: [PATCH 1/3] Move temp folder into repo to avoid state that cannot be cleaned by cleaning the repo --- PowerShellEditorServices.build.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index 3739f8c27..0462b7157 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -129,7 +129,10 @@ function Restore-NugetAsmForRuntime { [string]$TargetRuntime = $script:WindowsPowerShellFrameworkTarget ) - $tmpDir = [System.IO.Path]::GetTempPath() + $tmpDir = Join-Path $PSScriptRoot '.tmp' + if (-not (Test-Path $tmpDir)) { + New-Item -ItemType Directory -Path $tmpDir + } if (-not $DllName) { $DllName = "$PackageName.dll" From c11340ef7002e8c5fa52953b19fd5d8abe1e7c2a Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 1 Apr 2019 22:46:57 +0100 Subject: [PATCH 2/3] Add new .tmp directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 91c573d9c..3567788f8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ obj objd out/ tmp/ +.tmp App_Data *.user *.sln.cache From 55d3c7cfa7ff5743575002df1d0b7a4ba7d90ff4 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Wed, 3 Apr 2019 20:24:45 +0100 Subject: [PATCH 3/3] Delete .tmp folder in Clean task --- PowerShellEditorServices.build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index 0462b7157..2859f4a02 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -253,6 +253,7 @@ task SetupDotNet -Before Clean, Build, TestHost, TestServer, TestProtocol, Packa task Clean { exec { & $script:dotnetExe restore } exec { & $script:dotnetExe clean } + Remove-Item $PSScriptRoot\.tmp -Recurse -Force -ErrorAction Ignore Remove-Item $PSScriptRoot\module\PowerShellEditorServices\bin -Recurse -Force -ErrorAction Ignore Remove-Item $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin -Recurse -Force -ErrorAction Ignore Get-ChildItem -Recurse $PSScriptRoot\src\*.nupkg | Remove-Item -Force -ErrorAction Ignore