Debugging script.

This commit is contained in:
Roman Telezhynskyi 2024-01-25 11:32:13 +02:00
parent 4060160f87
commit e31bc4c0d4

View file

@ -1,17 +1,16 @@
$env:BUILD_FOLDER = "$env:APPVEYOR_BUILD_FOLDER\build";
$env:INSTALL_ROOT = "$env:BUILD_FOLDER\install-root";
$env:INSTALL_ROOT = "$env:BUILD_FOLDER\install-root\valentina";
$file_name = "valentina-$env:PLATFORM-$env:COMPILER-$env:ARCH-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT.exe";
if($env:DEPLOY -eq "true") {
Write-Host "[CI] Preparing installer." -ForegroundColor Green;
Rename-Item -Path "$env:INSTALL_ROOT\valentina\ValentinaInstaller.exe" -NewName "$file_name";
if ($?) {
Write-Error -Message "[CI] Error preparing installer." -Category InvalidResult;
$installerPath = "$env:INSTALL_ROOT\ValentinaInstaller.exe";
if (-not (Test-Path $installerPath)) {
Write-Error -Message "[CI] Installer file not found at $installerPath" -Category InvalidResult;
exit 1;
} else {
Write-Host "[CI] Done." -ForegroundColor Green;
}
Write-Host "[CI] Done." -ForegroundColor Green;
Write-Host "[CI] Starting cleaning." -ForegroundColor Green;
& $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" clean $env:ACCESS_TOKEN;
@ -23,7 +22,7 @@ if($env:DEPLOY -eq "true") {
}
Write-Host "[CI] Uploading." -ForegroundColor Green;
& $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" upload $env:ACCESS_TOKEN "$env:INSTALL_ROOT\valentina\$file_name" "/0.7.x/Windows/$file_name";
& $env:PYTHON\python.exe "$env:APPVEYOR_BUILD_FOLDER\scripts\deploy.py" upload $env:ACCESS_TOKEN "$env:INSTALL_ROOT\ValentinaInstaller.exe" "/0.7.x/Windows/$file_name";
if ($LastExitCode -ne 0) {
Write-Error -Message "[CI] Error uploading an artifact." -Category InvalidResult;
exit 1;