@@ -38,40 +38,47 @@ end {
3838 Start-PSBootstrap
3939 Start-BuildNativeUnixBinaries
4040
41- $buildOutputPath = Join-Path $RepoRoot " src/powershell-unix"
42- Compress-Archive - Path $buildOutputPath / libpsl- native.* - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
41+ if ($env: BUILD_REASON -ne ' PullRequest' ) {
42+ $buildOutputPath = Join-Path $RepoRoot " src/powershell-unix"
43+ Compress-Archive - Path $buildOutputPath / libpsl- native.* - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
44+ } else {
45+ Write-Verbose - Verbose " Skipping artifact upload since this is a PR."
46+ }
4347
4448 $testResultPath = Join-Path $RepoRoot - ChildPath ' src/libpsl-native/test/native-tests.xml'
4549
4650 if (Test-Path $testResultPath ) {
47- if ($Arch -eq ' linux-x64' ) {
48- $name = ' linux-x64-native-tests.xml'
49- }
50- else {
51- $name = ' osx-native-tests.xml'
52- }
53-
54- Copy-Item $testResultPath - Destination " $TargetLocation /$name " - Verbose
51+ Copy-Item $testResultPath - Destination $TargetLocation - Verbose - Force
5552 }
5653 }
5754 elseif ($Arch -eq ' linux-arm' ) {
5855 Start-PSBootstrap - BuildLinuxArm
5956 Start-BuildNativeUnixBinaries - BuildLinuxArm
6057
61- $buildOutputPath = Join-Path $RepoRoot " src/powershell-unix"
62- Compress-Archive - Path $buildOutputPath / libpsl- native.* - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
58+ if ($env: BUILD_REASON -ne ' PullRequest' ) {
59+ $buildOutputPath = Join-Path $RepoRoot " src/powershell-unix"
60+ Compress-Archive - Path $buildOutputPath / libpsl- native.* - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
61+ } else {
62+ Write-Verbose - Verbose " Skipping artifact upload since this is a PR."
63+ }
64+
6365 }
6466 else {
6567 Write-Verbose " Starting Start-PSBootstrap" - Verbose
6668 Start-PSBootstrap - BuildWindowsNative
6769 Write-Verbose " Starting Start-BuildNativeWindowsBinaries" - Verbose
6870 Start-BuildNativeWindowsBinaries - Configuration $Configuration - Arch $Arch - Clean
6971 Write-Verbose " Completed Start-BuildNativeWindowsBinaries" - Verbose
70- $buildOutputPath = Join-Path $RepoRoot " src/powershell-win-core"
71- Compress-Archive - Path " $buildOutputPath /*.dll" - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
7272
73- if ($Symbols.IsPresent ) {
74- Compress-Archive - Path " $buildOutputPath /*.pdb" - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Update - Verbose
73+ if ($env: BUILD_REASON -ne ' PullRequest' ) {
74+ $buildOutputPath = Join-Path $RepoRoot " src/powershell-win-core"
75+ Compress-Archive - Path " $buildOutputPath /*.dll" - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Verbose
76+
77+ if ($Symbols.IsPresent ) {
78+ Compress-Archive - Path " $buildOutputPath /*.pdb" - DestinationPath " $TargetLocation /$Arch -symbols.zip" - Update - Verbose
79+ }
80+ } else {
81+ Write-Verbose - Verbose " Skipping artifact upload since this is a PR."
7582 }
7683 }
7784}
0 commit comments