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

Implement #1054 - renamed tag => label #3314

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

arturcic
Copy link
Member

Closes #1054

Renamed
tag-pre-release-weight => label-pre-release-weight,
tag-prefix => label-prefix,
continuous-delivery-fallback-tag => continuous-delivery-fallback-label,
tag-number-pattern => label-number-pattern,
tag => label

@arturcic arturcic requested a review from asbjornu December 19, 2022 15:58
Copy link
Member

@asbjornu asbjornu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🎉 ❤️

Can you please note the change in BREAKING_CHANGES.md as well? 🙏🏼

@arturcic
Copy link
Member Author

Sure, I will

tag-pre-release-weight, tag-prefix, continuous-delivery-fallback-tag, tag-number-pattern, tag
@arturcic arturcic enabled auto-merge December 19, 2022 16:41
@arturcic arturcic merged commit 5669397 into GitTools:main Dec 19, 2022
@mergify
Copy link
Contributor

mergify bot commented Dec 19, 2022

Thank you @arturcic for your contribution!

arturcic added a commit to arturcic/GitVersion that referenced this pull request Dec 19, 2022
arturcic added a commit that referenced this pull request Dec 19, 2022
@ni-jsuchocki
Copy link
Contributor

Hello! Maybe it's too late but since 6.0.0 is still in beta, I figured I will ask - I understand that this change was done to avoid confusing "tag" with "git tag", right? In this case, shouldn't "tag-pre-release-weight" and "tag-prefix" stay the way they were?

@asbjornu
Copy link
Member

I believe you are quite right there, @ni-jsuchocki. The rename may have been a bit too greedy. Would you like to create an issue for it, or perhaps even fix it in a PR?

@HHobeck
Copy link
Contributor

HHobeck commented Apr 16, 2023

Actually I was also struggling sometimes when to use tag or when to use label. Do you change it back completely to tag?

If you consider the following sentences:

  • On the release branch I have defined the label name to beta. That means the next version is 6.0.0-beta.2.
  • On the develop branch I have defined an empty label name. That means the next version is 6.0.0-2.
  • On the main branch I have defined no label name. That means the next version is 6.0.0
  • The commit has been tagged with the value 6.0.0. The next version on release branch is 6.1.0-beta.1. The label name is still beta and the label is beta.1 and the tag for the next release candidate might be 6.1.0-beta.1.

What I'm trying to say is that in GitVersion tag and label is not the same and we should distinguish between the terms.

@HHobeck
Copy link
Contributor

HHobeck commented Apr 16, 2023

{label} = {label-name}.{label-number/pre-release-number}
{semantic-version} = {major}.{minor}.{patch}-{label}+{meta-data}
{tag} = v{major}.{minor}

@asbjornu
Copy link
Member

asbjornu commented Apr 16, 2023

Actually I was also struggling sometimes when to use tag or when to use label.

@HHobeck, it may become clearer if you read #1054. tag refers to git tag while label refers to "labels" as defined by SemVer:

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Do you change it back completely to tag?

No, we need to have both, but with a clear separation between what a tag and label is.

What I'm trying to say is that in GitVersion tag and label is not the same and we should distinguish between the terms.

Yes, absolutely. 👍🏼

@ni-jsuchocki
Copy link
Contributor

I believe you are quite right there, @ni-jsuchocki. The rename may have been a bit too greedy. Would you like to create an issue for it, or perhaps even fix it in a PR?

Yes, I will try and provide a PR!

@arturcic
Copy link
Member Author

@ni-jsuchocki I've created an issue you can reference #3480

@HHobeck
Copy link
Contributor

HHobeck commented Apr 18, 2023

I have taken a look and think it's not a good idea to rename label-pre-release-weight to tag-pre-release-weight.

We have already a branch related property with name pre-release-weight. Why not using just this property and remove label-pre-release-weight?

Anyway I think the business logic can be simplified:
image

@ni-jsuchocki
Copy link
Contributor

The documentation says:

The pre-release weight in case of tagged commits.

So I think having tag in the name is better than label. Can we continue this discussion in a PR I opened? #3481 I think changing the logic to merge those two properties is out of scope for this change

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

Successfully merging this pull request may close these issues.

Rename tag to label
4 participants