When generating a new meta file, we could add the distance between the last generated tag and the HEAD.
So to maintain natural ordering between version (especially for generated jar or docker images, pushed in artefact repository/registry), add the distance in generated version.
Example :
For a repo with the last released tag v1.0.0
When two commits (c1 and c2) have been added to the branch, generated versions with a SHA1 are not naturally sortable, because SHA1 are not intend to be sortable at all : v1.0.0-0xaaaaa (c1) > v1.0.0-0xbbbbb
A proposition could be to add the distance in generated version, which result to v1.0.0-1+aaaaa (c1) < v1.0.0-2+bbbbb (c2)
Thus, could we replace the 5 letters/digits SHA1 hexa to the standard short SHA1 from git ?
When generating a new meta file, we could add the distance between the last generated tag and the HEAD. So to maintain natural ordering between version (especially for generated jar or docker images, pushed in artefact repository/registry), add the distance in generated version.
Example : For a repo with the last released tag
v1.0.0
When two commits (c1 and c2) have been added to the branch, generated versions with a SHA1 are not naturally sortable, because SHA1 are not intend to be sortable at all : v1.0.0-0xaaaaa (c1) > v1.0.0-0xbbbbbA proposition could be to add the distance in generated version, which result to
v1.0.0-1+aaaaa
(c1) <v1.0.0-2+bbbbb
(c2)Thus, could we replace the 5 letters/digits SHA1 hexa to the standard short SHA1 from git ?