forked from ctaggart/SourceLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
69 lines (54 loc) · 1.69 KB
/
build.ps1
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$version = '2.6.1' # the version under development, update after a release
$versionSuffix = '-a125' # manually incremented for local builds
function isVersionTag($tag){
$v = New-Object Version
[Version]::TryParse($tag, [ref]$v)
}
if ($env:appveyor){
$versionSuffix = '-b' + [int]::Parse($env:appveyor_build_number).ToString('000')
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"
}
$pack = "pack", "-c", "release", "-o", "../bin", "/p:Version=$version$versionSuffix", "/v:m"
$pack += "/p:ci=true"
Set-Location $psscriptroot\dotnet-sourcelink
dotnet restore
dotnet $pack
Set-Location $psscriptroot\dotnet-sourcelink-git
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Create.GitHub
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Create.GitLab
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Create.BitBucket
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Create.BitBucketServer
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Create.CommandLine
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Test
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Embed.AllSourceFiles
dotnet restore
dotnet $pack
Set-Location $psscriptroot\SourceLink.Embed.PaketFiles
dotnet restore
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