Skip to content

Commit 7b0ef0e

Browse files
committed
Bypassing crossgen and artifact publishing for pull requests
1 parent d40322d commit 7b0ef0e

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

appveyor.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,13 @@ for:
4444
.\build.ps1 -buildNumber "$env:APPVEYOR_BUILD_NUMBER" -includeVersion (!$hasTag)
4545
after_build:
4646
- ps: >
47-
Get-ChildItem buildoutput\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName "Binaries" }
47+
if (!$env:APPVEYOR_PULL_REQUEST_NUMBER) {
48+
Get-ChildItem buildoutput\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName "Binaries" }
4849
49-
Get-ChildItem buildoutput\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName "Runtime" }
50+
Get-ChildItem buildoutput\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName "Runtime" }
51+
} else {
52+
Write-Host "Bypassing artifact publishing for pull request." -ForegroundColor Yellow
53+
}
5054
test_script:
5155
- ps: >
5256
.\run-tests.ps1

build.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,14 @@ foreach ($project in $projects)
176176
& dotnet $cmd
177177
}
178178

179+
$bypassPackaging = $env:APPVEYOR_PULL_REQUEST_NUMBER -and -not $env:APPVEYOR_PULL_REQUEST_TITLE.Contains("[pack]")
179180

180-
# build IL extensions
181-
BuildPackages "" $false
181+
if ($bypassPackaging){
182+
Write-Host "Bypassing artifact packaging and CrossGen for pull request." -ForegroundColor Yellow
183+
} else {
184+
# build IL extensions
185+
BuildPackages "" $false
182186

183-
#build win-x86 extensions
184-
BuildPackages "win-x86" $false
187+
#build win-x86 extensions
188+
BuildPackages "win-x86" $false
189+
}

0 commit comments

Comments
 (0)