-
Notifications
You must be signed in to change notification settings - Fork 41
/
build.ps1
executable file
·22 lines (19 loc) · 1014 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[xml]$doc = Get-Content .\src\Directory.Build.props
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
$versionSuffix = '-build.0' # manually incremented for local builds
function isVersionTag($tag){
$v = New-Object Version
[Version]::TryParse($tag, [ref]$v)
}
if ($env:appveyor){
$versionSuffix = '-build.' + $env:appveyor_build_number
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
$version = $env:appveyor_repo_tag_name
$versionSuffix = ''
}
Update-AppveyorBuild -Version "$version$versionSuffix"
}
dotnet build -c Release Chiron.sln /p:Version=$version$versionSuffix
dotnet test --no-build -c Release tests/Chiron.Tests/Chiron.Tests.fsproj
dotnet pack --no-build -c Release src/Chiron /p:Version=$version$versionSuffix -o $psscriptroot/bin
dotnet benchmarks/Chiron.Benchmarks/bin/Release/netcoreapp2.1/Chiron.Benchmarks.dll --class SwaggerSchema