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

[FEATURE] Allow the tag format to be configured #122

Closed
yourfate opened this issue Sep 24, 2021 · 4 comments · Fixed by #110
Closed

[FEATURE] Allow the tag format to be configured #122

yourfate opened this issue Sep 24, 2021 · 4 comments · Fixed by #110
Assignees
Labels
enhancement New feature or request

Comments

@yourfate
Copy link

yourfate commented Sep 24, 2021

Is your feature request related to a problem? Please describe.
Our verison tags for all projects use the format v2.3.7, note the v. This has advantages when filtering tags with the glob of git describe --match, as v*.*.* is a lot better of a glob than *.*.*, which would also match like bugfix-for-2.3.7-problem-x or some other custom tags we use.

It allows us to mention versions in tags without those tags being matched for things that extract the latest version tag from the history.

cog doesn't seem to recognize our tags though.

Describe the solution you'd like
Make the tag format configurable, or maybe even switch to the v*.*.* tag style entirely.

Note: the v*.*.* tags format is the default on Gitlab, it's pre-configured as protected and used by them to version gitlab itself, too. Other large projects like git or linux also use this format. Even semver themselves use it.

@yourfate yourfate added the enhancement New feature or request label Sep 24, 2021
@yourfate yourfate changed the title [FEATURE] [FEATURE] Allow the tag format to be configured Sep 24, 2021
@oknozor
Copy link
Collaborator

oknozor commented Sep 30, 2021

Hey @yourfate, thanks for the suggestion.

As you said the v*.*.* is widely used and it would definitely be useful for cog to support this.

I will implement it but I will not make this mandatory since this would break existing repo not using this convention, including cocogitto itself (see: SemVer FAQ).

Would you be ok with a config attribute in cog.toml like :

tag_prefix = "v"

This would be easy to implement and a non breaking change.

@oknozor oknozor added this to To do in next release Sep 30, 2021
@yourfate
Copy link
Author

Sounds good. I would still suggest making it default, allowing it to be configured "off".

@oknozor oknozor moved this from To do to In progress in next release Oct 20, 2021
@its-danny
Copy link
Contributor

@oknozor i'm down to work on this change if that's cool, not sure if you want to wait for new release or not first.

@oknozor
Copy link
Collaborator

oknozor commented Oct 21, 2021

@its-danny I am already working on this, sorry.

@oknozor oknozor mentioned this issue Oct 21, 2021
@oknozor oknozor moved this from In progress to Done in next release Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants