Skip to content

Commit

Permalink
Fix CI for tagged builds
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed Dec 22, 2018
1 parent b5e3cbe commit 45347c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/appveyor-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ $commit_hash = $dparts[2];

$masterBranches = @("master");

$is_tag_build = ($env:APPVEYOR_REPO_TAG -eq "true");

# If not in master branch, set branch variable
$av_branch = $env:APPVEYOR_REPO_BRANCH;
$branch = $(if ($masterBranches -contains $av_branch) { "" } else { "-$av_branch" });
$branch = $(if ($is_tag_build -or $masterBranches -contains $av_branch) { "" } else { "-$av_branch" });

# If this is a PR, add the PR suffix
$suffix = $(if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { "-pr$env:APPVEYOR_PULL_REQUEST_NUMBER" } else { "" });
Expand All @@ -27,6 +29,9 @@ $is_release_build = ($commits_since_tag -eq 0 -and $is_main_build)
$version = $(if ($is_release_build) { $short_version } else { "$short_version-$commit_hash" })
$bin_version = "$short_version.$build"

write-host -n "Branch: ";
write-host -f cyan $av_branch;

write-host -n "Release type: ";
if ($is_release_build) {write-host -f green 'release'} else { write-host -f yellow 'pre-release'}

Expand Down

0 comments on commit 45347c3

Please sign in to comment.