Skip to content

Commit f795bc2

Browse files
committed
Fix branch name
1 parent 88bfecb commit f795bc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var configuration =
55
"Release";
66
var preReleaseSuffix =
77
HasArgument("PreReleaseSuffix") ? Argument<string>("PreReleaseSuffix") :
8-
(TFBuild.IsRunningOnAzurePipelinesHosted && TFBuild.Environment.Repository.Branch.StartsWith("refs/tags/")) ? null :
8+
(TFBuild.IsRunningOnAzurePipelinesHosted && Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH").StartsWith("refs/tags/")) ? null :
99
(AppVeyor.IsRunningOnAppVeyor && AppVeyor.Environment.Repository.Tag.IsTag) ? null :
1010
EnvironmentVariable("PreReleaseSuffix") != null ? EnvironmentVariable("PreReleaseSuffix") :
1111
"beta";
@@ -26,7 +26,7 @@ var nuGetApiKey =
2626

2727
if (TFBuild.IsRunningOnAzurePipelinesHosted)
2828
{
29-
Information("BRANCH: " + TFBuild.Environment.Repository.Branch);
29+
Information("BRANCH: " + Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"));
3030
}
3131

3232
var artifactsDirectory = Directory("./Artifacts");

0 commit comments

Comments
 (0)