forked from commandlineparser/commandline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
79 lines (64 loc) · 2 KB
/
appveyor.yml
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
76
77
78
#version should be changed with any pull requests
version: 2.2.{build}
clone_depth: 1
pull_requests:
do_not_increment_build_number: true
#cache:
#- packages -> paket.dependencies
#- paket-files > paket.dependencies
init:
- ps: |
git config --global core.autocrlf input
if ($env:APPVEYOR_REPO_TAG -eq "true") {
$ver = $env:APPVEYOR_REPO_TAG_NAME
if($ver.StartsWith("v") -eq $true) { $ver = $ver.Substring(1) }
Update-AppveyorBuild -Version $ver
}
elseif([System.String]::IsNullOrEmpty($env:APPVEYOR_PULL_REQUEST_NUMBER) -eq $true) {
$ver = $env:APPVEYOR_BUILD_VERSION
$commit = $env:APPVEYOR_REPO_COMMIT.substring(0,7)
Update-AppveyorBuild -Version "$ver-$commit"
}
#version patching
assembly_info:
file: src\SharedAssemblyInfo.cs
patch: true
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: $(APPVEYOR_BUILD_VERSION)
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
package_version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
informational_version: '{version}'
environment:
matrix:
- BUILD_TARGET: base
NUSPEC_FILE: CommandLine
- BUILD_TARGET: fsharp
NUSPEC_FILE: CommandLine.FSharp
build_script:
- cmd: build.cmd %BUILD_TARGET%
after_build:
- ps: |
powershell get-childitem Release\* -include *.dll | foreach-object { "{0}`t{1}" -f $_.Path, [System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileVersion }
.\build-nuget-pack.cmd $env:BUILD_TARGET $env:NUSPEC_FILE
test: auto
artifacts:
- path: 'Release/**/*.nupkg'
name: NugetPackages
on_failure:
- cmd: |
tree /f /a >files.lst
appveyor PushArtifact .\files.lst -DeploymentName "Failed Build File Listing"
deploy:
- provider: NuGet
api_key:
secure: +Zxb8M5W+UJV1yd9n8seu3PvH/hGNPEmgriGBnsSmtxjKPQAJ4+iL7tKAmfPHAuG
artifact: 'NuGetPackages'
on:
branch: /master|v\d+\.\d+\.\d+[.*]/
APPVEYOR_REPO_TAG: true