Skip to content

tracks-release-branches won't track remote release branches without regex mod #3337

@jjdenhup

Description

@jjdenhup

This may be working as intended, but does not seem to be desirable behavior to me.

With a release regex of regex: ^release-:
If I clone my repo, am on a branch that tracks-release-branches (develop below), and do not have my release branches local then the wrong version is reported until/unless I either I pull the latest release branch local or change my regex.

I can work around it with a regex of
regex: release-
but this feels wrong, as then release is valid anywhere in the branch name.

I am currently using this as my workaround, which is acceptable
regex: ^(origin/)?release-
and I can understand why this might be needed from a regex perspective, but it does not feel logical to me that it is from a usage perspective.

Is this workaround the correct fix, should this be fixed in the code, or am I missing something else?
Thanks!

GitVersion.yml:

develop:
    mode: ContinuousDeployment
    tag: aDevelop
    increment: None
    prevent-increment-of-merged-branch-version: false
    track-merge-target: true
    regex: ^develop$
    source-branches:
    - develop
    - release
    tracks-release-branches: true
    is-release-branch: false
    is-mainline: false
    pre-release-weight: 0
release:
    mode: ContinuousDeployment
    tag: bRelease
    increment: None
    prevent-increment-of-merged-branch-version: true
    track-merge-target: false
    regex: ^release-
    source-branches:
    - develop
    - release
    tracks-release-branches: false
    is-release-branch: true
    is-mainline: false
    pre-release-weight: 30000

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions