This is not a question about how to number versions.
We have an application with a certain version numbering scheme. We also have a Jenkins CI server (soon to be replaced with Atlassian's Bamboo) that regularly builds our software. The application displays the version number, so it's written in one of the files in our code base.
We don't want to manually change the version number before releasing a version. Our current solution is that we have a Jenkins job that changes the version number in our code base, commits it, tags the repository with the version number, pushes it and then packages the application for distribution. The problem with that is that we have to decide to release a version before the build succeeds or fails.
What we want to do is this: have Jenkins regularly build our product and run the unit tests. Afterwards, we want to select a passing build and release it with a certain version number.
In summary, this is the process I want:
- Jenkins builds and tests our product regularly.
- When we want to release a version, we can select the last passing build from Jenkins and check to release it.
- The resulting release should include the version number.
- The commit that was built and released should be tagged with the release number.
What is the best practice for releasing product versions? Is there a process that will meet my demands?