Skip to content

Commit 717d0cf

Browse files
authored
Do not remove packages folder in ci (#3556)
1 parent e68248e commit 717d0cf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/build.ps1

+8-4
Original file line numberDiff line numberDiff line change
@@ -887,10 +887,14 @@ function Create-NugetPackages {
887887

888888
Copy-Item (Join-Path $env:TP_PACKAGE_PROJ_DIR "Icon.png") $stagingDir -Force
889889

890-
# Remove all locally built nuget packages before we start creating them
891-
# we are leaving them in the folder after uzipping them for easier review.
892-
if (Test-Path $packageOutputDir) {
893-
Remove-Item $packageOutputDir -Recurse -Force -Exclude "manifest","source-build"
890+
# Packages folder should not be cleared on CI.
891+
# Artifacts from source-build are downloaded into this directory before the build starts, and this would remove them.
892+
if (-not $TPB_CIBuild) {
893+
# Remove all locally built nuget packages before we start creating them
894+
# we are leaving them in the folder after uzipping them for easier review.
895+
if (Test-Path $packageOutputDir) {
896+
Remove-Item $packageOutputDir -Recurse -Force
897+
}
894898
}
895899

896900
if (-not (Test-Path $packageOutputDir)) {

0 commit comments

Comments
 (0)