sourcegit/build/build.windows.ps1
leo 7f7e5ef5f8 refactor: rewrite all build scripts
* supports generate rpm package on Linux
* use a global VERSION file
2024-04-16 17:29:36 +08:00

13 lines
402 B
PowerShell

$version = Get-Content .\VERSION
if (Test-Path SourceGit) {
Remove-Item SourceGit -Recurse -Force
}
Remove-Item *.zip -Force
dotnet publish ..\src\SourceGit.csproj -c Release -r win-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
Remove-Item SourceGit\*.pdb -Force
Compress-Archive -Path SourceGit -DestinationPath "sourcegit_$version.win-x64.zip"