Skip to content

Move temp folder into repo to avoid state that causes build errors from time to time when rebuilding locally (and packages have updated) #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ obj
objd
out/
tmp/
.tmp
App_Data
*.user
*.sln.cache
Expand Down
6 changes: 5 additions & 1 deletion PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -250,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
Expand Down