-
Notifications
You must be signed in to change notification settings - Fork 19
/
appveyor.yml
53 lines (44 loc) · 2.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
49
50
51
52
53
image: Visual Studio 2019
configuration: Release
platform: Any CPU
skip_tags: true
services:
- mssql2017
install:
- ps: Write-Host "SQL Server Compact installed" -foregroundcolor Green
- ps: $env:version_file_path = ".\version.props"
- ps: gitversion /output buildserver
- ps: $env:major_version = (Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/MajorVersion" | Select-Object -ExpandProperty Node).InnerText
- ps: $env:minor_version = (Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/MinorVersion" | Select-Object -ExpandProperty Node).InnerText
- ps: $env:release_version = [string]([int]((Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/ReleaseVersion" | Select-Object -ExpandProperty Node).InnerText) + 1)
- ps: $env:revision = $env:GitVersion_CommitsSinceVersionSource
- ps: Update-AppveyorBuild -Version "$env:major_version.$env:minor_version.$env:release_version.$env:revision.$env:APPVEYOR_BUILD_NUMBER"
- ps: $xReleaseVersion = Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/ReleaseVersion"
- ps: $xReleaseVersion.Node.InnerText = $env:release_version
- ps: $xReleaseVersion.Node.OwnerDocument.Save($xReleaseVersion.Path)
- ps: $xRevision = Select-Xml -Path $env:version_file_path -XPath "/Project/PropertyGroup/Revision"
- ps: $xRevision.Node.InnerText = $env:revision
- ps: $xRevision.Node.OwnerDocument.Save($xRevision.Path)
dotnet_csproj:
patch: false
before_build:
- cmd: dotnet restore "source\Data.sln"
build:
project: source\Data.sln
parallel: true
verbosity: minimal
after_build:
- cmd: scripts\CREATE_Northwind.bat
after_test:
- cmd: scripts\DROP_Northwind.bat
artifacts:
- path: 'bin\Release\EnterpriseLibrary.Data.*.nupkg'
name: 'EnterpriseLibrary.Data'
on_success:
- ps: git config --global credential.helper store
- ps: Add-Content "$HOME\.git-credentials" "https://$($env:github_access_token):x-oauth-basic@github.com`n"
- ps: git config --global user.email "$env:github_email"
- ps: git config --global user.name "$env:github_name"
- git pull
- git commit -m "Revision update by AppVeyor [ci skip]" -- version.props
- git push