forked from netchx/netch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
44 lines (36 loc) · 773 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
param (
[Parameter()]
[ValidateSet('Debug', 'Release')]
[string]
$Configuration = 'Release',
[Parameter()]
[ValidateNotNullOrEmpty()]
[string]
$OutputPath = 'release',
[Parameter()]
[bool]
$SelfContained = $False,
[Parameter()]
[bool]
$PublishReadyToRun = $False,
[Parameter()]
[bool]
$PublishSingleFile = $True
)
.\scripts\download.ps1 $OutputPath
if ( -Not $? ) {
Exit 1
}
Write-Host "Building $Configuration to $OutputPath"
dotnet publish `
-c $Configuration `
-r "win-x64" `
-p:Platform="x64" `
-p:PublishSingleFile=$PublishSingleFile `
-p:SelfContained=$SelfContained `
-p:PublishTrimmed=$SelfContained `
-p:PublishReadyToRun=$PublishReadyToRun `
-o $OutputPath `
Netch\Netch.csproj
if ($lastExitCode) { exit $lastExitCode }
exit 0