24 lines
772 B
PowerShell
24 lines
772 B
PowerShell
# publish-windows-service.ps1
|
|
# Kullanim: .\publish-windows-service.ps1
|
|
# Cikti: E:\Publish\MessagingService\WindowsService\
|
|
|
|
$project = "$PSScriptRoot\src\presentation\DigitalData.MessagingService.API\DigitalData.MessagingService.API.csproj"
|
|
$output = "M:\App&Service\0 DD - Funktionsmodule\MessagingService\PreRelease\WindowsService\net8"
|
|
|
|
Write-Host "Publishing to $output ..." -ForegroundColor Cyan
|
|
|
|
dotnet publish $project `
|
|
--configuration Release `
|
|
--runtime win-x64 `
|
|
--self-contained true `
|
|
--output $output `
|
|
-p:EnvironmentName=Production `
|
|
-p:PublishSingleFile=false
|
|
|
|
if ($LASTEXITCODE -eq 0) {
|
|
Write-Host "Done. Files at: $output" -ForegroundColor Green
|
|
} else {
|
|
Write-Host "Publish FAILED." -ForegroundColor Red
|
|
exit 1
|
|
}
|