-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.ps1
21 lines (18 loc) · 931 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[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 Hephaestus.sln /p:Version=$version$versionSuffix
dotnet pack --no-build -c Release src/Hephaestus /p:Version=$version$versionSuffix -o $psscriptroot/bin
dotnet pack --no-build -c Release src/Hephaestus.Hopac /p:Version=$version$versionSuffix -o $psscriptroot/bin