-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
48 lines (40 loc) · 1.16 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
image: Visual Studio 2017
configuration: Release
version: '{build}'
install:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "false")
{
$version = & { git describe --tags } 2>&1
$baseVersion = (& { git describe --tags --abbrev=0 }) 2>&1
$prereleaseVersion = $version.SubString($baseVersion.Length)
$adjustedBaseVersion = $baseVersion.Split(".")
$adjustedBaseVersion[2] = ($adjustedBaseVersion[2] / 1) + 1
$env:COMMIT_DESCRIPTION = [System.String]::Join(".", $adjustedBaseVersion) + $prereleaseVersion
}
else
{
$env:COMMIT_DESCRIPTION = $env:APPVEYOR_REPO_TAG_NAME
}
Write-Host Build version is $env:COMMIT_DESCRIPTION
dotnet_csproj:
patch: true
file: 'System.Data.Async\System.Data.Async.csproj'
version: $(commit_description)
before_build:
- cmd: dotnet restore
build:
project: System.Data.Async.sln
test_script:
- cmd: >-
dotnet test Samples/Moq/Moq.csproj
dotnet test Samples/LocalDb/LocalDb.csproj
artifacts:
- path: '**/*.nupkg'
name: Nuget Packages
deploy:
- provider: NuGet
api_key:
secure: qCE488IP602Gb2O9fBrkiO9p7qph3S4iVrbm0Ji/6HRk1Du9g6y5MV0cN6/wNviU
on:
appveyor_repo_tag: true