Skip to content
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

GitInfo.cache collects warnings which leads to build errors #91

Closed
AOrazaev opened this issue Mar 7, 2019 · 3 comments
Closed

GitInfo.cache collects warnings which leads to build errors #91

AOrazaev opened this issue Mar 7, 2019 · 3 comments
Labels

Comments

@AOrazaev
Copy link

AOrazaev commented Mar 7, 2019

Hi, this is not the first time I hit this issue with GitInfo. First time and probably this time I'll fix git warning and will not have problem, but still its possible to hit it from time to time.

In our repo describe tags prints warning

$ git describe --tags
warning: tag 'refs/tags/Cloud_1.0_Deployment' is really 'Cloud_1.0_Deployment' here
refs/tags/Cloud_1.0_Deployment-99-g9500e448

As a result GitInfo.cache has tag info which look like this:

GitTag=warning: tag 'refs/tags/Cloud_1.0_Deployment' is really 'Cloud_1.0_Deployment' here;refs/tags/Cloud_1.0_Deployment-99-g9500e448;
GitBaseTag=refs/tags/Cloud_1.0_Deployment;warning: tag 'refs/tags/Cloud_1.0_Deployment' is really 'Cloud_1.0_Deployment' here;

Which leads to build error.

@kzu
Copy link
Member

kzu commented Oct 15, 2019

If you're not using the tags for versioning, you can turn off tag processing entirely GitIgnoreTagVersion. Or do you still use some tags for versioning and also for other purposes simulateously?

@kzu kzu added the need info More info needed to diagnose the issue label Oct 15, 2019
@AOrazaev
Copy link
Author

As I said, I proceeded with fixing warning in git. But this is just a workaround as the suggested method with ignoring tags.

Warning shouldn't be parsed as a tag information.

@kzu kzu added bug and removed need info More info needed to diagnose the issue labels Aug 26, 2021
@kzu
Copy link
Member

kzu commented Feb 6, 2023

We now provide $(GitTagRegex) which is passed to git describe --tags --match to filter out the ones you don't want (defaults to *). We also always validate the tag against the version regex, so the error should be obvious too.

@kzu kzu closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants