-
Notifications
You must be signed in to change notification settings - Fork 3
/
pack.ps1
38 lines (34 loc) · 1.03 KB
/
pack.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
param(
[Parameter(Mandatory=$true)]
[string]$output,
[switch]$stable = $false,
[string]$versionSuffix = $null,
[switch]$symbols = $false
)
$projects = @(
"MorseL",
"MorseL.Common",
"MorseL.Common.WebSockets",
"MorseL.Diagnostics",
"MorseL.Client",
"MorseL.Sockets",
"MorseL.Scaleout",
"MorseL.Scaleout.Redis"
)
$packArguments = New-Object System.Collections.ArrayList
$_ = $packArguments.Add("pack")
$_ = $packArguments.Add("--output")
$_ = $packArguments.Add((Resolve-Path $output))
$_ = $packArguments.Add("--include-source")
$_ = $packArguments.Add("--include-symbols")
$_ = $packArguments.Add("--version-suffix")
$_ = $packArguments.Add($versionSuffix)
if ($stable -Or -Not $versionSuffix) {
$_ = $packArguments.RemoveAt($packArguments.Count - 1)
$_ = $packArguments.RemoveAt($packArguments.Count - 1)
}
foreach ($project in $projects) {
$_ = $packArguments.Add("src\$project\$project.csproj")
dotnet @packArguments
$_ = $packArguments.RemoveAt($packArguments.Count - 1)
}