sourcegit/build/build.windows.ps1
leo 96d4150d26 project: reorganize the structure of the project.
* remove dotnet-tool.json because the project does not rely on any dotnet tools.
* remove Directory.Build.props because the solution has only one project.
* move src/SourceGit to src. It's not needed to put all sources into a subfolder of src since there's only one project.
2024-04-02 20:00:33 +08:00

15 lines
500 B
PowerShell

if (Test-Path SourceGit) {
Remove-Item SourceGit -Recurse -Force
}
if (Test-Path SourceGit.win-x64.zip) {
Remove-Item SourceGit.win-x64.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
Remove-Item SourceGit\zh -Recurse -Force
Remove-Item SourceGit\en -Recurse -Force
Compress-Archive -Path SourceGit -DestinationPath SourceGit.win-x64.zip