blob: 7d2465ba90a30323c2d9e2eefe89fbb4b9541a58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
version: '0.20.2.{build}'
branches:
only:
- master
- vNext
skip_tags: true
clone_folder: C:\projects\libgit2sharp
environment:
matrix:
- xunit_runner: xunit.console.clr4.exe
Arch: 64
- xunit_runner: xunit.console.clr4.x86.exe
Arch: 32
matrix:
fast_finish: true
install:
- ps: |
Write-Host "Commit being built = $($Env:APPVEYOR_REPO_COMMIT)"
Write-Host "Current build version = $($Env:APPVEYOR_BUILD_VERSION)"
Write-Host "Target branch = $($Env:APPVEYOR_REPO_BRANCH)"
Write-Host "Is a Pull Request = $($Env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null)"
$VersionSuffix = ""
If ($Env:APPVEYOR_REPO_BRANCH -ne "master")
{
$VersionSuffix = "-pre"
}
$Version = "$($Env:APPVEYOR_BUILD_VERSION)$($VersionSuffix)"
$Env:ASSEMBLY_INFORMATIONAL_VERSION = $Version
Write-Host "Assembly informational version = $($Env:ASSEMBLY_INFORMATIONAL_VERSION)"
$ShouldPublishNugetArtifact = "$($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)"
$Env:SHOULD_PUBLISH_NUGET_ARTIFACT = $ShouldPublishNugetArtifact
Write-Host "Should publish Nuget artifact = $($Env:SHOULD_PUBLISH_NUGET_ARTIFACT)"
assembly_info:
patch: true
file: LibGit2Sharp\Properties\AssemblyInfo.cs
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '$(ASSEMBLY_INFORMATIONAL_VERSION)'
cache:
- packages
before_build:
- nuget restore "C:\projects\libgit2sharp\LibGit2Sharp.sln"
build_script:
- msbuild "C:\projects\libgit2sharp\LibGit2Sharp.sln" /verbosity:normal /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /property:ExtraDefine="LEAKS_IDENTIFYING"
test_script:
- '%xunit_runner% "C:\projects\libgit2sharp\LibGit2Sharp.Tests\bin\Release\LibGit2Sharp.Tests.dll" /appveyor'
- IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
on_success:
- ps: |
- ps: |
& "C:\projects\libgit2sharp\nuget.package\BuildNugetPackage.ps1" "$env:APPVEYOR_REPO_COMMIT"
Add-Type -Path "C:\projects\libgit2sharp\LibGit2Sharp\bin\Release\LibGit2Sharp.dll"
Write-Host "LibGit2Sharp version = $([LibGit2Sharp.GlobalSettings]::Version)" -ForegroundColor "Magenta"
If ($Env:SHOULD_PUBLISH_NUGET_ARTIFACT -eq $True)
{
Get-ChildItem "C:\projects\libgit2sharp\LibGit2sharp\*.nupkg" | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}
notifications:
- provider: Email
to:
- emeric.fermas@gmail.com
on_build_status_changed: true
|