Skip to content

Commit 1758a48

Browse files
authored
Merge pull request #55 from LeeCampbell/AppVeyorScript
Adding AppVeyor build file. Allows builds to vary by branch if required
2 parents c5a655a + 624c471 commit 1758a48

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

appveyor.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: 1.{build}.0
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
image: WMF 5
5+
build_script:
6+
- ps: >-
7+
Write-Host $env:APPVEYOR_BUILD_VERSION
8+
9+
Write-Host $env:APPVEYOR_PULL_REQUEST_NUMBER
10+
11+
Write-Host $env:APPVEYOR_PULL_REQUEST_TITLE
12+
13+
Write-Host $env:APPVEYOR_REPO_NAME
14+
15+
Write-Host $env:APPVEYOR_REPO_BRANCH
16+
17+
Write-Host $env:APPVEYOR_REPO_COMMIT
18+
19+
Write-Host $env:APPVEYOR_JOB_ID
20+
21+
22+
$semver = $env:APPVEYOR_BUILD_VERSION;
23+
24+
if($env:APPVEYOR_PULL_REQUEST_NUMBER -ge 0) {
25+
$semver = "$semver-PR$env:APPVEYOR_PULL_REQUEST_NUMBER";
26+
}
27+
28+
29+
Import-Module .\build\psake.psm1
30+
31+
Invoke-psake .\build\build.ps1 -taskList Test,Package -properties @{"semver"="$semver";}
32+
33+
34+
Write-Host "Uploading test results"
35+
36+
$uploadPath = "https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)"
37+
38+
$testResults = (Resolve-Path .\TestResult.xml)
39+
40+
Write-Host "Sending $testResults to $uploadPath"
41+
42+
43+
$wc = New-Object 'System.Net.WebClient'
44+
45+
$wc.UploadFile($uploadPath, $testResults)
46+
test: off
47+
artifacts:
48+
- path: Working\Nuget\*.nupkg
49+
notifications:
50+
- provider: GitHubPullRequest
51+
on_build_success: true
52+
on_build_failure: true
53+
on_build_status_changed: true

0 commit comments

Comments
 (0)