-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.ps1
More file actions
27 lines (21 loc) · 1.02 KB
/
release.ps1
File metadata and controls
27 lines (21 loc) · 1.02 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
Write-Host "Version string (example 1.2.1): " -ForegroundColor Cyan -NoNewline
$version = Read-Host
# update assembly version
$filepath = "TacticalLauncher\Properties\AssemblyInfo.cs"
$pattern = '\[assembly: AssemblyVersion\("(.*)"\)\]'
(Get-Content $filepath) | ForEach-Object{
if($_ -match $pattern){
'[assembly: AssemblyVersion("{0}.0")]' -f $version
} else {
$_ # Output line as is
}
} | Set-Content $filepath
# build / publish app
dotnet publish -c Release -o ".\publish"
# find Squirrel.exe path and add an alias
Set-Alias Squirrel ($env:USERPROFILE + "\.nuget\packages\clowd.squirrel\2.9.42\tools\Squirrel.exe");
New-Item -ItemType Directory -Force -Path Releases
# download currently live version
Squirrel http-down --url "https://tmr.nalsai.de/download"
# build new version and delta updates
Squirrel pack --framework net6 --packId "TacticalLauncher" --packVersion $version --packAuthors "Da Real Royal" --packDir ".\publish" --icon ".\TacticalLauncher\images\icon.ico" --splashImage "spinner.gif"