GitTools / GitTools/GitVersion

[ISSUE]: next-version must include tag-prefix

Open
#5,228 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

breaking change feature good first issue help wanted improvement
Dominant language
C#
Stars
3.1k
Forks
659
Avg merge
13h 15m
Merged PRs (30d)
51

Description

Prerequisites
  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported
GitVersion package

GitVersion.Portable

GitVersion version

6.8.2

Operating system

Windows

What are you seeing?

When configuring tag-prefix to something non-optional, next-version cannot be used without including that prefix.

In a monorepo I've got a tag-prefix per package, like "package-a/v" and "package-b/v". If I then set next-version to something normal like "1.4.5", I get an error saying "Failed to parse 1.4.5 into a Semantic Version".

If I change next-version to package-a/v1.4.5, I get the desired result.

What is expected?

Since next-version is not a tag, it's a version, I don't see any reason for it to require the tag-prefix, it should just be read as-is as a version without stripping any tag.

Steps to Reproduce

This can be reproduced with a minimal config in any repo with at least one commit, no tags needed:

tag-prefix: 'project-a/'
# fails
next-version: 1.2.3
# works
next-version: project-a/1.2.3
RepositoryFixture Test

No response

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the parsing path for next-version and the handling of tag-prefix in the GitVersion codebase. Reproduce the issue with the minimal configuration shown, then add or update coverage for both prefixed and unprefixed next-version values. Done means next-version: 1.2.3 is accepted when tag-prefix is non-optional, while tag parsing remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
release, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.