Skip to content

Commit 88c6b4c

Browse files
Allow PRs to upload artifacts (#36)
1 parent 367360a commit 88c6b4c

File tree

3 files changed

+12
-28
lines changed

3 files changed

+12
-28
lines changed

.vsts-ci/mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ phases:
2222
- powershell: |
2323
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$(System.ArtifactsDirectory)/Packages/osx-symbols.zip"
2424
displayName: Upload artifacts
25-
condition: ne(variables['Build.Reason'], 'PullRequest')
25+
condition: succeeded()

.vsts-ci/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ phases:
5252
- powershell: |
5353
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$(System.ArtifactsDirectory)\Packages\$(buildName)-symbols.zip"
5454
displayName: Upload artifacts
55-
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
55+
condition: succeeded()

tools/releaseBuild/PowershellNative.ps1

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,8 @@ end {
3838
Start-PSBootstrap
3939
Start-BuildNativeUnixBinaries
4040

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-
}
41+
$buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
42+
Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
4743

4844
$testResultPath = Join-Path $RepoRoot -ChildPath 'src/libpsl-native/test/native-tests.xml'
4945

@@ -55,23 +51,15 @@ end {
5551
Start-PSBootstrap -BuildLinuxArm
5652
Start-BuildNativeUnixBinaries -BuildLinuxArm
5753

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-
}
54+
$buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
55+
Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
6456
}
6557
elseif ($Arch -eq 'linux-arm64') {
6658
Start-PSBootstrap -BuildLinuxArm64
6759
Start-BuildNativeUnixBinaries -BuildLinuxArm64
6860

69-
if ($env:BUILD_REASON -ne 'PullRequest') {
70-
$buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
71-
Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
72-
} else {
73-
Write-Verbose -Verbose "Skipping artifact upload since this is a PR."
74-
}
61+
$buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
62+
Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
7563
}
7664
else {
7765
Write-Verbose "Starting Start-PSBootstrap" -Verbose
@@ -80,15 +68,11 @@ end {
8068
Start-BuildNativeWindowsBinaries -Configuration $Configuration -Arch $Arch -Clean
8169
Write-Verbose "Completed Start-BuildNativeWindowsBinaries" -Verbose
8270

83-
if ($env:BUILD_REASON -ne 'PullRequest') {
84-
$buildOutputPath = Join-Path $RepoRoot "src/powershell-win-core"
85-
Compress-Archive -Path "$buildOutputPath/*.dll" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
71+
$buildOutputPath = Join-Path $RepoRoot "src/powershell-win-core"
72+
Compress-Archive -Path "$buildOutputPath/*.dll" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
8673

87-
if ($Symbols.IsPresent) {
88-
Compress-Archive -Path "$buildOutputPath/*.pdb" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Update -Verbose
89-
}
90-
} else {
91-
Write-Verbose -Verbose "Skipping artifact upload since this is a PR."
74+
if ($Symbols.IsPresent) {
75+
Compress-Archive -Path "$buildOutputPath/*.pdb" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Update -Verbose
9276
}
9377
}
9478
}

0 commit comments

Comments
 (0)