Automatic versioning

Hi,

is there anyone who uses versioning? I would like to automate the version/build numbers increasement, currently i enter a new version by hand into code (increase the number with each release).

I am using Devops Pipeline to build the (Spring Boot) jar file and soon i will deploy it automatically after a build process. So i would like to have increasing the build number for each build and once a new release is shipped, i need to set the new version number anyhow. And the version + build number should be available to show it in the view.

Thank for some experience you have made and some best practice.

No more words needed: Maven Release Plugin

1 Like

Here is a recipe I have been using myself: How do I show application Java and Vaadin versions in UI - Vaadin Cookbook

It is relying on the Spring application.properties updated from pom.xml version on each build and used at runtime from Java.

@Sami except for the java version, all information are automatically published by spring boot via BuildProperties class available after using the “build-info” goal, no need for s custom solution :grinning:

1 Like

Nice, I think we need an updated example. :slight_smile: I didn’t find those back then, and I just realized there are two Java versions you might be interested in: build-time and runtime.

In case the question was not answered satisfactorily by the other answers.

The question did not ask for getting the Java or Vaadin versions, but just wanted an automated solution to having the application version number updated.

I want to propose a project like GitCliff, which can give you a changelog and version numbers automatically from the git commit messages.

I think it is worth investigating as an alternative to the current suggestions.

1 Like