Improve the deployment script.
This commit is contained in:
parent
7f64637798
commit
92eaf1000d
|
@ -1,9 +1,11 @@
|
||||||
$env:ROOT_FOLDER = "C:\projects\valentina";
|
$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") {
|
if($env:DEPLOY -eq "true") {
|
||||||
Write-Host "[CI] Starting packing." -ForegroundColor Green;
|
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) {
|
if ($LastExitCode -ne 0) {
|
||||||
Write-Error -Message "[CI] Error creating an archive." -Category InvalidResult;
|
Write-Error -Message "[CI] Error creating an archive." -Category InvalidResult;
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -12,7 +14,7 @@ if($env:DEPLOY -eq "true") {
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "[CI] Uploading." -ForegroundColor Green;
|
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) {
|
if ($LastExitCode -ne 0) {
|
||||||
Write-Error -Message "[CI] Error uploading an artifact." -Category InvalidResult;
|
Write-Error -Message "[CI] Error uploading an artifact." -Category InvalidResult;
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user