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
AzureDevops task
What are you seeing?
I am experiencing unexpected behavior when using GitVersion in a multi-repository pipeline setup. It appears that the branch is being detected based on the pipeline variable and not the branch of the repository checked out in the targetPath.
Problem:
In my pipeline, I have multiple repositories:
Main repository / Self (checked out on develop branch)
Secondary repositories (checked out on v3.0.0 tag, v4.0.0, etc.)
Despite the secondary repositories being on the v3.0.0 tag, GitVersion seems to calculate the version as if it’s still on the develop branch of the main pipeline. As a result, the version calculated for the secondary repositories ends up as 3.0.0-alpha.0 instead of 3.0.0, which reflects the tag v3.0.0 it's actually checked out on.
This behavior causes issues with tagging and versioning in multi-repository pipelines, especially when different repositories are on different branches or tags.
Can you please provide guidance on how to ensure that the version is calculated based on the branch/tag of the repository in the targetPath?
As a fix we changed the self/main repo branch name from develop to main. so there is no label added. We could also provide a GitVersion.yaml to fix this behaviour but it feels wrong that the Self Branch Name gets used for the SemVer calculation of secondary repositories.
Thank you!
What is expected?
Expected Behavior:
GitVersion should calculate the version based on the branch or tag of the repository in the targetPath, not just the pipeline branch. In this case, it should detect that the secondary repository is on v3.0.0 and return the version 3.0.0, not 3.0.0-alpha.0.
Expected Output:
Version returned: 3.0.0 (from the v3.0.0 tag of the secondary repository).
Steps to Reproduce
Steps to Reproduce:
Set up a pipeline with two repositories.
Checkout the main/self repository on a develop branch.
Checkout a secondary repository on a tag, e.g., v3.0.0.
Run GitVersion on targetPath={secondaryRepoPath} to calculate the version.
Observed Output:
Version returned: 3.0.0-alpha.0 (from the develop branch of the pipeline).
Environment:
GitVersion version: 6.x
CI System: Azure DevOps
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
GitVersion package
AzureDevops task
What are you seeing?
I am experiencing unexpected behavior when using GitVersion in a multi-repository pipeline setup. It appears that the branch is being detected based on the pipeline variable and not the branch of the repository checked out in the targetPath.
Problem:
In my pipeline, I have multiple repositories:
Despite the secondary repositories being on the v3.0.0 tag, GitVersion seems to calculate the version as if it’s still on the develop branch of the main pipeline. As a result, the version calculated for the secondary repositories ends up as 3.0.0-alpha.0 instead of 3.0.0, which reflects the tag v3.0.0 it's actually checked out on.
This behavior causes issues with tagging and versioning in multi-repository pipelines, especially when different repositories are on different branches or tags.
Can you please provide guidance on how to ensure that the version is calculated based on the branch/tag of the repository in the targetPath?
As a fix we changed the self/main repo branch name from develop to main. so there is no label added. We could also provide a GitVersion.yaml to fix this behaviour but it feels wrong that the Self Branch Name gets used for the SemVer calculation of secondary repositories.
Thank you!
What is expected?
Expected Behavior:
GitVersion should calculate the version based on the branch or tag of the repository in the targetPath, not just the pipeline branch. In this case, it should detect that the secondary repository is on v3.0.0 and return the version 3.0.0, not 3.0.0-alpha.0.
Expected Output:
Steps to Reproduce
Steps to Reproduce:
Observed Output:
Environment:
Output log or link to your CI build (if appropriate).
No response
The text was updated successfully, but these errors were encountered: