You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.Tool
GitVersion version
6.0.2
Operating system
Linux
What are you seeing?
When running a tag pipeline, the tag is incorrectly detected as a branch. GitVersion gets its branch name from the environment variable CI_COMMIT_REF_NAME, but this variable is set to the tag when it's running a tag pipeline.
Example:
Tag a commit as v1.1.2
This executes a tag pipeline in GitLab CI
The resulting SemVer will be 1.1.3-v1-1-2.1
What is expected?
A SemVer of 1.1.2 (in this example)
Steps to Reproduce
See example in the issue description.
More details in the discussion #4183
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered:
The two issues are basically the same, yes. But this issue is about the incorrect usage of a GitLab CI specific environment variable, the other issue is about Azure Pipelines.
It might be better if there's a universal fix, as you said. But I believe this is a quick fix and it mirrors the fix for GitHub Actions which seems to have had a very similar problem, so it might still be a good idea to apply it for now.
Prerequisites
GitVersion package
GitVersion.Tool
GitVersion version
6.0.2
Operating system
Linux
What are you seeing?
When running a tag pipeline, the tag is incorrectly detected as a branch. GitVersion gets its branch name from the environment variable CI_COMMIT_REF_NAME, but this variable is set to the tag when it's running a tag pipeline.
Example:
What is expected?
A SemVer of 1.1.2 (in this example)
Steps to Reproduce
See example in the issue description.
More details in the discussion #4183
RepositoryFixture Test
No response
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered: