Fix PowerShell script issues: replace pushd/popd aliases and remove unused variable

This commit is contained in:
2025-08-29 12:57:55 +02:00
parent c0197b728d
commit 4f32e0a2fd

View File

@ -64,7 +64,7 @@ Write-Host "Build erfolgreich abgeschlossen!" -ForegroundColor Green
# Tests ausführen
Write-Host "Führe Tests aus..." -ForegroundColor Yellow
if (Test-Path "build\CTestTestfile.cmake") {
pushd build
Push-Location build
try {
ctest -C Release --output-on-failure
if ($LASTEXITCODE -ne 0) {
@ -72,7 +72,7 @@ if (Test-Path "build\CTestTestfile.cmake") {
exit 1
}
} finally {
popd
Pop-Location
}
Write-Host "Tests erfolgreich." -ForegroundColor Green
} else {
@ -310,7 +310,7 @@ if (Test-Path $distPath) {
}
try {
$uploadResponse = Invoke-RestMethod -Uri $uploadUri -Method Post -Headers $uploadHeaders -Body $body
Invoke-RestMethod -Uri $uploadUri -Method Post -Headers $uploadHeaders -Body $body | Out-Null
Write-Host "$($artifact.Name) erfolgreich hochgeladen" -ForegroundColor Green
} catch {
Write-Host " ✗ Fehler beim Hochladen von $($artifact.Name): $($_.Exception.Message)" -ForegroundColor Red