Skip to content

Commit b379c51

Browse files
committed
BUILD_SOURCEBRANCH is assumed to be relevant
1 parent 52e9155 commit b379c51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GitVersion.BuildAgents/Agents/AzurePipelines.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ public override string[] GenerateSetParameterMessage(string name, string? value)
1717
$"##vso[task.setvariable variable=GitVersion.{name};isOutput=true]{value}"
1818
];
1919

20-
public override string? GetCurrentBranch(bool usingDynamicRepos) => Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH");
20+
public override string? GetCurrentBranch(bool usingDynamicRepos) => Environment.GetEnvironmentVariable("GIT_BRANCH")
21+
?? Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH");
2122

2223
public override bool PreventFetch() => true;
2324

0 commit comments

Comments
 (0)