From 11ee72a0a483c61835161afcbe3da0f59182e40a Mon Sep 17 00:00:00 2001 From: Alexander Rose Date: Fri, 12 Jul 2019 10:21:23 +0200 Subject: [PATCH] use new varable name for current branch in gitlab ci --- src/GitVersionCore/BuildServers/GitLabCi.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitVersionCore/BuildServers/GitLabCi.cs b/src/GitVersionCore/BuildServers/GitLabCi.cs index c02fa99d69..5bac3426e9 100755 --- a/src/GitVersionCore/BuildServers/GitLabCi.cs +++ b/src/GitVersionCore/BuildServers/GitLabCi.cs @@ -1,4 +1,4 @@ -namespace GitVersion +namespace GitVersion { using System; using System.IO; @@ -37,7 +37,7 @@ public override string[] GenerateSetParameterMessage(string name, string value) public override string GetCurrentBranch(bool usingDynamicRepos) { - return Environment.GetEnvironmentVariable("CI_BUILD_REF_NAME"); + return Environment.GetEnvironmentVariable("CI_COMMIT_REF_NAME"); } public override bool PreventFetch() @@ -57,4 +57,4 @@ void WriteVariablesFile(VersionVariables variables) File.WriteAllLines(_file, BuildOutputFormatter.GenerateBuildLogOutput(this, variables)); } } -} \ No newline at end of file +}