forked from ctaggart/SourceLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
37 lines (30 loc) · 1.13 KB
/
Copy pathbuild.ps1
File metadata and controls
37 lines (30 loc) · 1.13 KB
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
$version = '3.2.0' # 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"
}
# just build some, as we are not packing them yet for v3
$build = "build", "-c", "release", "/p:Version=$version$versionSuffix", "/v:m"
$pack = "pack", "-c", "release", "-o", "../bin", "/p:Version=$version$versionSuffix", "/v:m"
$pack += "/p:ci=true"
Set-Location $psscriptroot\Tests
dotnet test -c release /v:m
Set-Location $psscriptroot\dotnet-sourcelink
dotnet $pack
# Set-Location $psscriptroot\build
# dotnet restore
# $nupkgs = ls ..\bin\*$version$versionSuffix.nupkg
# foreach($nupkg in $nupkgs){
# echo "test $nupkg"
# dotnet sourcelink test $nupkg
# }
Set-Location $psscriptroot