From 73d0d71cfddca87b93bbdbd1160635a956ffc1ce Mon Sep 17 00:00:00 2001 From: Medeni Baykal <433724+Haplois@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:47:01 +0200 Subject: [PATCH 1/2] Do not remove packages folder in ci --- scripts/build.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index f5fe085bc5..e87257accd 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -887,10 +887,12 @@ function Create-NugetPackages { Copy-Item (Join-Path $env:TP_PACKAGE_PROJ_DIR "Icon.png") $stagingDir -Force - # Remove all locally built nuget packages before we start creating them - # we are leaving them in the folder after uzipping them for easier review. - if (Test-Path $packageOutputDir) { - Remove-Item $packageOutputDir -Recurse -Force -Exclude "manifest","source-build" + if (-not $TPB_CIBuild) { + # Remove all locally built nuget packages before we start creating them + # we are leaving them in the folder after uzipping them for easier review. + if (Test-Path $packageOutputDir) { + Remove-Item $packageOutputDir -Recurse -Force + } } if (-not (Test-Path $packageOutputDir)) { From c34ad53eae6060968f44bb803f96838e273e5f73 Mon Sep 17 00:00:00 2001 From: Medeni Baykal <433724+Haplois@users.noreply.github.com> Date: Fri, 8 Apr 2022 11:45:11 +0200 Subject: [PATCH 2/2] Update build.ps1 --- scripts/build.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index e87257accd..f84e19c59e 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -887,6 +887,8 @@ function Create-NugetPackages { Copy-Item (Join-Path $env:TP_PACKAGE_PROJ_DIR "Icon.png") $stagingDir -Force + # Packages folder should not be cleared on CI. + # Artifacts from source-build are downloaded into this directory before the build starts, and this would remove them. if (-not $TPB_CIBuild) { # Remove all locally built nuget packages before we start creating them # we are leaving them in the folder after uzipping them for easier review.