Skip to content

[Bug] dotnet-gitversion fails with "Couldn't find any remote tips from remote" #3657

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
josefpihrt opened this issue Aug 17, 2023 · 8 comments

Comments

@josefpihrt
Copy link

Describe the bug

Command dotnet-gitversion is run as a part of my GH workflow. When I create a PR which has a single commit then dotnet-gitversion command fails:

https://github.com/JosefPihrt/DotMarkdown/actions/runs/5891598645/job/15978994483?pr=39

When PR contains more than one commit the command dotnet-gitversion is executed successfully

https://github.com/JosefPihrt/DotMarkdown/actions/runs/5891741555/job/15979466559?pr=39

Context

I cannot merge PR with single commit

Your Environment

GH workflow

@josefpihrt josefpihrt added the bug label Aug 17, 2023
@josefpihrt
Copy link
Author

I would appreciate some feedback on this issue. Thanks.

@HHobeck
Copy link
Contributor

HHobeck commented Dec 7, 2023

Hi @josefpihrt.

Does this problem existing in 6.0.0-beta.3 version as well? Can you create an integration test (on main branch)?

[Test]
public void __Just_A_Test__()
{
	var configuration = GitFlowConfigurationBuilder.New.Build();

	using EmptyRepositoryFixture fixture = new("main");

	fixture.MakeACommit();

	// ✔️ succeeded as expected
	fixture.AssertFullSemver("0.0.1-1", configuration);

or

	// ❌ expected 0.1.0-1
	fixture.AssertFullSemver("0.0.1-1", configuration);
}

Anyway the logs for this run have expired and are no longer available. Please provide steps to reproduce.

Thank you very much.

@josefpihrt
Copy link
Author

@HHobeck Thanks for your reply.

The issue disappears after update to 5.11.1. Which is good.

Nevertheless, when updating to 5.12.0 there seems to be some change in how tags are evaluated.

When I use 5.11.1 and I create tag v1.0.0-rc.1, the SemVer is 1.0.0-rc.1 as expected.

But when I use 5.12.0 the SemVer is 1.0.0-tags-v1-0-0-rc-1.1.

After update to 6.0.0-beta3 the command fails with following message:

Could not build the configuration instance because following exception occurred: 'Property 'tag' not found on type 'GitVersion.Configuration.BranchConfiguration'.' Please ensure that the /overrideconfig parameters are correct and the configuration file is in the correct format.

My config file:

build-metadata-padding: 4
mode: ContinuousDeployment

branches:
  main:
    tag: beta
  pull-request:
    tag: alpha
    tag-number-pattern: '[/-](?<number>\d+)[-/]'

Conclusion

I'm fine with staying on 5.11.1 but I'm confused with a change in SemVer between 5.11.0 and 5.12.0.

@HHobeck
Copy link
Contributor

HHobeck commented Dec 7, 2023

May I ask you to try this?

mode: ContinuousDeployment
branches:
  main:
    label: beta
  pull-request:
    label: alpha
    label-number-pattern: '[/-](?<number>\d+)[-/]'

@josefpihrt
Copy link
Author

Updating config file fixes the error but the issue with SemVer persists.

@HHobeck
Copy link
Contributor

HHobeck commented Dec 7, 2023

Okay can you reproduce it locally or create an integration test? It's not clear for me how to anaylse it. Logs would be also nice

@HHobeck
Copy link
Contributor

HHobeck commented Dec 7, 2023

Maybe it is related to this:

@josefpihrt
Copy link
Author

Yes, it seems to be duplicate of #3351. Thanks for help.

@josefpihrt josefpihrt closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants