diff --git a/scripts/publish-backend-selfcontained.ps1 b/scripts/publish-backend-selfcontained.ps1 new file mode 100644 index 0000000..6798222 --- /dev/null +++ b/scripts/publish-backend-selfcontained.ps1 @@ -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 \ No newline at end of file diff --git a/scripts/publish-client-selfcontained.ps1 b/scripts/publish-client-selfcontained.ps1 new file mode 100644 index 0000000..193d7d4 --- /dev/null +++ b/scripts/publish-client-selfcontained.ps1 @@ -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 \ No newline at end of file