Support optional chars in tag_format depending on if var is set or not
Description
I would like to have tags such as: v1.0.0-rc1
I can use tag_format: v$major.$minor.$patch-$prerelease but this breaks down if we don't have a prerelease var because an extra dash is added at the end.
According to dogs only v1.0.0rc1 is supported, but that breaks semantic versioning (which I'm using).
Is it possible to add this feature? Or did I miss something and we already have this?
Possible Solution
Allow the use of a bracket to show optional if set, for example in bash you can use: ${prerelease:+"-$prerelease"} which only sets the - if the variable is not empty.
If supporting this, I also recommend to support the opposing which can set a value if the variable is empty: ${prerelease:-"empty"}
To be clear, I don't recommend to support bash expansion, just these two specific use cases in whatever syntax seems appropriate :)
Additional context
No response
Additional context
No response
I'm good with this feature 🙂 @Woile What do you think?
Guys, are you taking in concideration this feature?
It'll be awesome because you can implement more semantic version styling tags for the projects that have to use these kinds of tags, but love commitizen.
Hi @sanslash332 , yes, I think we agree on this feature. But I don't think we have the bandwidth to work on new features ourselves these days. Our main focus these days is to review / fix / discuss incoming PRs. It'd be really appreciated if you're interested in sending us a PR. Thanks!