File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -887,10 +887,14 @@ function Create-NugetPackages {
887
887
888
888
Copy-Item (Join-Path $env: TP_PACKAGE_PROJ_DIR " Icon.png" ) $stagingDir - Force
889
889
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
+ }
894
898
}
895
899
896
900
if (-not (Test-Path $packageOutputDir )) {
You can’t perform that action at this time.
0 commit comments