-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.ps1
26 lines (15 loc) · 1.29 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
param(
[string] $Architecture = "x64",
[string] $Version = "0.1.4.0"
)
$ErrorActionPreference = "Stop";
Write-Output "Start building singleWithRuntime...";
dotnet publish src/PipManager.Windows.csproj -c Release -r "win-$Architecture" -o "build/$Version/singleWithRuntime" -p:Platform=$Architecture -p:PublishReadyToRun=true -p:EnableCompressionInSingleFile=true -p:PublishSingleFile=true -p:SelfContained=true -p:AssemblyVersion=$Version -p:Configuration=Release;
Rename-Item -Path "build/$Version/singleWithRuntime/PipManager.Windows.exe" -NewName "PipManager_withRuntime.exe"
Remove-Item -Path "build/$Version/singleWithRuntime/*.xml" -Force -ErrorAction SilentlyContinue
Write-Output "Start building singleWithoutRuntime...";
dotnet publish src/PipManager.Windows.csproj -c Release -r "win-$Architecture" -o "build/$Version/singleWithoutRuntime" -p:Platform=$Architecture -p:PublishReadyToRun=false -p:EnableCompressionInSingleFile=false -p:PublishSingleFile=true -p:SelfContained=false -p:AssemblyVersion=$Version -p:Configuration=Release;
Rename-Item -Path "build/$Version/singleWithoutRuntime/PipManager.Windows.exe" -NewName "PipManager.exe"
Remove-Item -Path "build/$Version/singleWithoutRuntime/*.xml" -Force -ErrorAction SilentlyContinue
Write-Output "Build Finished";
[Console]::ReadKey()