Examples on how to get semantic versioning automated using GitVersion not only with .NET but also with Ant, Maven & Jenkins
Clone this repo
git clone https://github.com/mkoertgen/hello.gitversion.gitThen start playing around with GitFlow, e.g. using Atlassian SourceTree.
For instance,
- switch branches,
- create a
feature, - do a
releaseor ahotfix
Then check how versioning is affected, using
gitversionFor GitHubFlow try the same using feature branches and pull requests
export GITVERSION_SEMVER=$(docker-compose run gitversion | tr -dc '[[:print:]]')
docker-compose build mavenMaven uses the special ${revision} variable to set the version, see https://maven.apache.org/maven-ci-friendly.html .
The flatten-maven-plugin is needed, if you want to install/deploy the build artifact.