Add dedicated self-contained publish helpers

Add backend and client self-contained publish scripts that clean the public output folders and publish Release win-x64 builds with the .NET runtime included for easier deployment.
feature/centralized-offline-canteen
SYED MUSTUFA AHMED NAQVI 2026-07-13 14:04:16 +05:00
parent 688ef2afd3
commit 2792a02460
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,20 @@
$ErrorActionPreference = "Stop"
$ProjectPath = ".\UtopiaCanteen.BackendService\UtopiaCanteen.BackendService.csproj"
$OutputPath = "C:\Users\Public\UtopiaCanteenBackend"
Write-Host "Cleaning old backend publish folder..."
if (Test-Path $OutputPath) {
Remove-Item $OutputPath -Recurse -Force
}
Write-Host "Publishing backend as self-contained..."
dotnet publish $ProjectPath `
-c Release `
-r win-x64 `
--self-contained true `
-p:PublishSingleFile=false `
-o $OutputPath
Write-Host "Backend self-contained publish completed:"
Write-Host $OutputPath

View File

@ -0,0 +1,20 @@
$ErrorActionPreference = "Stop"
$ProjectPath = ".\UtopiaCanteen.Client\UtopiaCanteen.Client.csproj"
$OutputPath = "C:\Users\Public\UtopiaCanteenClient"
Write-Host "Cleaning old client publish folder..."
if (Test-Path $OutputPath) {
Remove-Item $OutputPath -Recurse -Force
}
Write-Host "Publishing client as self-contained..."
dotnet publish $ProjectPath `
-c Release `
-r win-x64 `
--self-contained true `
-p:PublishSingleFile=false `
-o $OutputPath
Write-Host "Client self-contained publish completed:"
Write-Host $OutputPath