Skip to content

Commit 11ee72a

Browse files
rose-aarturcic
authored andcommitted
use new varable name for current branch in gitlab ci
1 parent 877d6ce commit 11ee72a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitVersionCore/BuildServers/GitLabCi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace GitVersion
1+
namespace GitVersion
22
{
33
using System;
44
using System.IO;
@@ -37,7 +37,7 @@ public override string[] GenerateSetParameterMessage(string name, string value)
3737

3838
public override string GetCurrentBranch(bool usingDynamicRepos)
3939
{
40-
return Environment.GetEnvironmentVariable("CI_BUILD_REF_NAME");
40+
return Environment.GetEnvironmentVariable("CI_COMMIT_REF_NAME");
4141
}
4242

4343
public override bool PreventFetch()
@@ -57,4 +57,4 @@ void WriteVariablesFile(VersionVariables variables)
5757
File.WriteAllLines(_file, BuildOutputFormatter.GenerateBuildLogOutput(this, variables));
5858
}
5959
}
60-
}
60+
}

0 commit comments

Comments
 (0)