-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.ps1
More file actions
34 lines (25 loc) · 939 Bytes
/
Copy pathdeploy.ps1
File metadata and controls
34 lines (25 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$ErrorActionPreference = "Stop"
$projectPath = ".\Backend\TaskManagement.API\TaskManagement.API.csproj"
$publishPath = ".\publish\backend"
Write-Host "========================================"
Write-Host " Task Management API Deployment"
Write-Host "========================================"
if (-not (Test-Path $projectPath)) {
Write-Error "Proje dosyası bulunamadı: $projectPath"
exit 1
}
Write-Host "`nEski publish çıktısı temizleniyor..."
if (Test-Path $publishPath) {
Remove-Item $publishPath -Recurse -Force
}
Write-Host "`nNuGet paketleri geri yükleniyor..."
dotnet restore $projectPath
Write-Host "`nRelease build alınıyor..."
dotnet build $projectPath -c Release --no-restore
Write-Host "`nUygulama publish ediliyor..."
dotnet publish $projectPath `
-c Release `
-o $publishPath `
--no-build
Write-Host "`nDeployment çıktısı başarıyla hazırlandı."
Write-Host "Konum: $publishPath"