GitVersion icon indicating copy to clipboard operation
GitVersion copied to clipboard

[ISSUE]: GitVersion /showconfig confirm config is used but result is like if there's no config taken

Open ebfortin opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [x] I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.Tool

GitVersion version

6.0.2

Operating system

Windows

What are you seeing?

I run "dotnet GitVersion /showconfig /config GitVersion.yml" in the root directory of my project. The result confirm that the config file GitVersion.yml is used as I see that for the develop branch it should use the label 'unstable'.

branches:
  develop:
    mode: ContinuousDeployment
    label: unstable
    increment: Minor
    prevent-increment:
      of-merged-branch: false
      when-current-commit-tagged: false
    track-merge-target: true
    track-merge-message: true
    regex: ^dev(elop)?(ment)?$
    source-branches:
    - main
    is-source-branch-for: []
    tracks-release-branches: true
    is-release-branch: false
    is-main-branch: false
    pre-release-weight: 0

When I run "dotnet GitVersion /config GitVersion.yml" it use the generic configuration and doesn't use unstable for the develop branch. Instead it uses "Branch.develop".

  "BranchName": "develop",
  "BuildMetaData": null,
  "CommitDate": "2024-09-15",
  "CommitsSinceVersionSource": 250,
  "EscapedBranchName": "develop",
  "FullBuildMetaData": "Branch.develop.Sha.6c66efb22a24e2479f1462b3435155864c3b21f0",
  "FullSemVer": "0.1.0",
  "InformationalVersion": "0.1.0+Branch.develop.Sha.6c66efb22a24e2479f1462b3435155864c3b21f0",

What is expected?

The configuration should be used.

Steps to Reproduce

| dotnet GitVersion /showconfig /config GitVersion.yml Develop branch has a "unstable" label configrued.

| dotnet GitVersion /config GitVersion.yml GitVersion uses "Branch.develop" instead of "unstable".

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

No response

ebfortin avatar Sep 18 '24 13:09 ebfortin