Skip to content

Commit

Permalink
Merge pull request #3901 from HHobeck/bug/BUILD_SOURCEBRANCH-is-assum…
Browse files Browse the repository at this point in the history
…ed-to-be-relevant

BUILD_SOURCEBRANCH is assumed to be relevant
  • Loading branch information
arturcic authored Feb 7, 2024
2 parents 52e9155 + b379c51 commit f185574
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GitVersion.BuildAgents/Agents/AzurePipelines.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public override string[] GenerateSetParameterMessage(string name, string? value)
$"##vso[task.setvariable variable=GitVersion.{name};isOutput=true]{value}"
];

public override string? GetCurrentBranch(bool usingDynamicRepos) => Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH");
public override string? GetCurrentBranch(bool usingDynamicRepos) => Environment.GetEnvironmentVariable("GIT_BRANCH")
?? Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH");

public override bool PreventFetch() => true;

Expand Down

0 comments on commit f185574

Please sign in to comment.