diff --git a/.appveyor/moveTagForSpecialBranches.ps1 b/.appveyor/moveTagForSpecialBranches.ps1 index f4f1e3df..1759bb76 100644 --- a/.appveyor/moveTagForSpecialBranches.ps1 +++ b/.appveyor/moveTagForSpecialBranches.ps1 @@ -1,8 +1,7 @@ - if($Env:APPVEYOR_REPO_TAG -ne "true") { - Write-Host "Pushed tag detected" + Write-Host "Push without tag detected" if($Env:APPVEYOR_REPO_BRANCH -eq "appveyorTest"){ - Write-Host "Nightly build tag was detected" + Write-Host "Nightly build branch was detected" $targetTag = "Nightly" $Env:NIGHTLY_BUILD = true } @@ -17,8 +16,4 @@ if($Env:APPVEYOR_REPO_TAG -ne "true") { git push -q -f "https://$($Env:GitHubKey):x-oauth-basic@github.com/lukeIam/Vocaluxe.git" "$targetTag"; Write-Host "Tag $targetTag points now to the head of branch $Env:APPVEYOR_REPO_BRANCH" -} -else -{ - Write-Host "No tag for this detected" } \ No newline at end of file diff --git a/.appveyor/nightlyDetect.ps1 b/.appveyor/nightlyDetect.ps1 new file mode 100644 index 00000000..34048cce --- /dev/null +++ b/.appveyor/nightlyDetect.ps1 @@ -0,0 +1,17 @@ +if($Env:APPVEYOR_REPO_TAG -eq "true") { + Write-Host "Taged commit detected" + $targetTag = $Env:APPVEYOR_REPO_TAG_NAME + Write-Host "Tag=$targetTag" + $Env:NIGHTLY_BUILD = "false" + if($targetTag -eq "Nightly") { + $Env:NIGHTLY_BUILD = "true" + Write-Host "This is a nightly build" + } + else + { + Write-Host "This is NOT a nightly build" + } +} +else{ + Return; +} \ No newline at end of file diff --git a/.appveyor/prepareDeploy.ps1 b/.appveyor/prepareDeploy.ps1 index 32eae62d..188ca94b 100644 --- a/.appveyor/prepareDeploy.ps1 +++ b/.appveyor/prepareDeploy.ps1 @@ -1,12 +1,9 @@ if($Env:APPVEYOR_REPO_TAG -eq "true") { $targetTag = $Env:APPVEYOR_REPO_TAG_NAME - Write-Host "Tag=$targetTag" - $Env:NIGHTLY_BUILD = "false" - if($targetTag -eq "Nightly") { - $Env:NIGHTLY_BUILD = "true" - } + Write-Host "Deploy for tag $targetTag" } else{ + Write-Host "No tag found: no preparation required" Return; } diff --git a/appveyor.yml b/appveyor.yml index cf3863f9..f2c6263d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,6 +50,8 @@ after_build: appveyor PushArtifact Vocaluxe_%TAG_NAME_WITH_BRANCH_NAME_FALLBACK%_Windows_%PLATFORM%.zip -FileName Vocaluxe_%TAG_NAME_WITH_BRANCH_NAME_FALLBACK%_Windows_%PLATFORM%.zip -DeploymentName ReleaseZip cd .. + + powershell .\.appveyor\nightlyDetect.ps1 test: off before_deploy: - ps: ./.appveyor/prepareDeploy.ps1