FAQ | This is a LIVE service | Changelog

maven.gitlab-ci.yml : SNAPSHOT releases out-of-sync with propper releases

The .version script in maven.gitlab-ci.yml, which after issue https://gitlab.developers.cam.ac.uk/uis/devops/hr/wr/wrs-webapp/-/issues/174 will only be used for determining the next snapshot version, bases it's last published version as the last published snapshot version, and so produced versions that are out of sync from the last release version.

For example, in WRS, the last release version was v5.59.10, but running the manual snapshot publish step (e.g. here) is producing versions incrementally from the last published snapshot version, v5.45.14-SNAPSHOT, so the next version published is v5.45.15-SNAPSHOT.

This is potentially confusing since it breaks the usual maven convention, where x.y.z-SNAPSHOT is a work-in-progress that becomes x.y.z when released. (Citation needed. This might just be what I am used to.)

This shouldn't cause any practical problems. Our snapshot versions can be totally independent of our release versions. But it might be better to change our snapshot version naming scheme to something completely different that won't cause confusion to anyone familiar with maven.

Proposal: What if we named snapshot versions as "{commit-sha}-SNAPSHOT"?

If we keep the current numbering approach, the change in the logic needs to be:

Assuming last release was v5.59.10:

  • if there are no snapshot versions for the next minor version, e.g. v5.59.11-SNAPSHOT, then the next snapshot for a fix: should be v5.59.11-SNAPSHOT
  • if there are already SNAPSHOT versions for the next incremental release, then then next SNAPSHOT version for a fix: should be + 0.0.1, e.g. v5.59.12-SNAPSHOT
Edited by Kevin Hooke