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
Version with branch name if not on master #466
Comments
Hello, <replacementProperties>
<!--
example:
apply replacement only to the specific property git.branch and replace '/' with '-'
see also [issue 138](https://github.com/git-commit-id/maven-git-commit-id-plugin/issues/138)
-->
<replacementProperty>
<property>git.branch</property>
<propertyOutputSuffix>something</propertyOutputSuffix>
<token>^([^\/]*)\/([^\/]*)$</token>
<value>$1-$2</value>
<regex>true</regex>
<forceValueEvaluation>false</forceValueEvaluation>
</replacementProperty>
</replacementProperties> When looking at the https://gitversion.net/docs/more-info/variables it seems that all variables can be generated from |
Thanks for the prompt feedback. That works. Didn't know about the
-- I realize it's not that easy to build a semantic compatible version (https://semver.org/) https://gitversion.net/docs/git-branching-strategies/githubflow-examples |
Describe your idea
A proeprty which displays the feature branch name. It's empty if on master. A leading dash is needed to use it as postfix.
Expected Behavior
Default Release is mostly:
artifact-v1.0.0
Release on feature branch is now:
artifact-v1.0.0-7
Better would be:
artifact-v1.0.0-7-my-new-featuer
Additional context
Please also have a look at this tool, doing the same in the MS world:
https://gitversion.net/docs/more-info/variables
The text was updated successfully, but these errors were encountered: