Skip to content

Commit 45347c3

Browse files
committed
Fix CI for tagged builds
1 parent b5e3cbe commit 45347c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/appveyor-install.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ $commit_hash = $dparts[2];
99

1010
$masterBranches = @("master");
1111

12+
$is_tag_build = ($env:APPVEYOR_REPO_TAG -eq "true");
13+
1214
# If not in master branch, set branch variable
1315
$av_branch = $env:APPVEYOR_REPO_BRANCH;
14-
$branch = $(if ($masterBranches -contains $av_branch) { "" } else { "-$av_branch" });
16+
$branch = $(if ($is_tag_build -or $masterBranches -contains $av_branch) { "" } else { "-$av_branch" });
1517

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

32+
write-host -n "Branch: ";
33+
write-host -f cyan $av_branch;
34+
3035
write-host -n "Release type: ";
3136
if ($is_release_build) {write-host -f green 'release'} else { write-host -f yellow 'pre-release'}
3237

0 commit comments

Comments
 (0)