From 92eaf1000db1b50aa3f6c45817fd59a1728b8270 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 3 May 2021 17:32:50 +0300 Subject: [PATCH] Improve the deployment script. --- scripts/appveyor-deploy.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/appveyor-deploy.ps1 b/scripts/appveyor-deploy.ps1 index d52604644..8c06e907b 100644 --- a/scripts/appveyor-deploy.ps1 +++ b/scripts/appveyor-deploy.ps1 @@ -1,9 +1,11 @@ $env:ROOT_FOLDER = "C:\projects\valentina"; -$env:BUILD_FOLDER = "C:\projects\valentina\build"; +$env:BUILD_FOLDER = "$env:ROOT_FOLDER\build"; + +$file_name = "valentina-win-$env:PLATFORM-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT.tar.xz"; if($env:DEPLOY -eq "true") { Write-Host "[CI] Starting packing." -ForegroundColor Green; - & $env:PYTHON\python.exe $env:ROOT_FOLDER\scripts\deploy.py pack .\package\valentina\ "$env:BUILD_FOLDER\package\valentina-win-$env:PLATFORM-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT.tar.xz"; + & $env:PYTHON\python.exe "$env:ROOT_FOLDER\scripts\deploy.py" pack "$env:BUILD_FOLDER\package\valentina" "$env:BUILD_FOLDER\package\$file_name"; if ($LastExitCode -ne 0) { Write-Error -Message "[CI] Error creating an archive." -Category InvalidResult; exit 1; @@ -12,7 +14,7 @@ if($env:DEPLOY -eq "true") { } Write-Host "[CI] Uploading." -ForegroundColor Green; - & $env:PYTHON\python.exe $env:ROOT_FOLDER\scripts\deploy.py upload $env:ACCESS_TOKEN "$env:BUILD_FOLDER\package\valentina-win-$env:PLATFORM-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT.zip" "/0.7.x/Windows/valentina-win-$env:PLATFORM-$env:QT_VERSION-$env:APPVEYOR_REPO_BRANCH-$env:APPVEYOR_REPO_COMMIT.zip"; + & $env:PYTHON\python.exe "$env:ROOT_FOLDER\scripts\deploy.py" upload $env:ACCESS_TOKEN "$env:BUILD_FOLDER\package\$file_name" "/0.7.x/Windows/$file_name"; if ($LastExitCode -ne 0) { Write-Error -Message "[CI] Error uploading an artifact." -Category InvalidResult; exit 1;