Skip to content

[ISSUE]: 6.2.0 seems to be adding unnecessary pre-release suffix to the tag #4480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
justadreamer opened this issue Apr 2, 2025 · 6 comments · Fixed by #4483
Closed
2 tasks done

[ISSUE]: 6.2.0 seems to be adding unnecessary pre-release suffix to the tag #4480

justadreamer opened this issue Apr 2, 2025 · 6 comments · Fixed by #4483
Labels
Milestone

Comments

@justadreamer
Copy link

justadreamer commented Apr 2, 2025

Prerequisites

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

GitVersion package

GitVersion.Tool

GitVersion version

6.2.0

Operating system

Windows, macOS, Linux

What are you seeing?

Adds a pre-release suffix differently regardless of the operating system:

❯ dotnet-gitversion version
6.2.0+Branch.main.Sha.c2bc09f9ee048c6bdce6ec494fa48cb74420f608
❯ dotnet-gitversion . /config ../common-ci/GitVersion.yml /format '{SemVer}'
5.0.64-1

You can see our GitVersion.yml here: https://github.com/51Degrees/common-ci/blob/main/GitVersion.yml

What is expected?

Previously it was not adding a pre-release suffix:

❯ dotnet-gitversion version
6.1.0+Branch.main.Sha.8856e3041dbb768118a55a31ad4e465ae70c6767
❯ dotnet-gitversion . /config ../common-ci/GitVersion.yml /format '{SemVer}'
5.0.64

We expect it to stay that way.

Steps to Reproduce

Steps are specified above

RepositoryFixture Test

No response

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

f.e. here: https://github.com/51Degrees/device-detection-nginx/actions/runs/14210425608/job/39816479668#step:5:38

it gets worse on non-main branches: 
https://github.com/51Degrees/device-detection-cxx/actions/runs/14209141831/job/39824275265#step:5:35
@kucuk-furkan
Copy link

I got same issue today. I think its about "/config" switch. In my case it looks like cli doesn't use my "/config" path. It loads default configuration.

Also its runs okay with 6.1.0 version. I'm checking 6.1.0 and 6.2.0 differences. If i found something further, i'll let you know.

@HHobeck
Copy link
Contributor

HHobeck commented Apr 2, 2025

I have tested it and see that the native gitversion execution works as expected with ContinuousDeployment mode.

@kucuk-furkan
Copy link

My config, command and output are like below. Tool doesnt use my custom config. Tool uses default configuration. Also i tried relative path like .ci/gitversion.config but it doesnt changed anything - as expected, because tool makes givin config path as full path -. I looked configProvider etc but didnt find any change to cause this issue after 6.1.0 released.

/usr/bin/dotnet gitversion /diag 1 /verbosity Diagnostic /config /agent/_work/1/s/.ci/gitversion.config /showConfig

output.txt

I uploaded my config as gitversion.txt but its actually gitversion.config.
gitversion.txt

@kucuk-furkan
Copy link

Found it! I will give details - and probably a pull request - in couple hours

@kucuk-furkan
Copy link

In earlier changes there is a change to how should tool locating configuration files. It cause a problem if /config arguments is used. Now if its used and configuration file is presents, locator returns custom configuration file path directly.

This isn't a problem before this change merged. In dotnet Path.Combine method handles if path is rooted automatically. But with this pr, tool stops using Path.Combine and starts directly looking under givin directory path. For further information, you can check this Microsoft documentation. In this documentation; we are interested with combine method's examples section - path1 and path3 combine example -.

I'm created a pr #4483.

Is there any chance to make this hotfix? If its not considered as hotfix, i will change all my pipelines to use 6.1.0 until this pr merged or this issue fixed

@arturcic arturcic added this to the 6.2.x milestone Apr 7, 2025
@arturcic arturcic added bug and removed needs triage labels Apr 15, 2025
@gittools-bot
Copy link

🎉 This issue has been resolved in version 6.3.0 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants