Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the distance between the current commit and the last tag #25

Open
dpanza opened this issue Sep 19, 2022 · 0 comments
Open

Add the distance between the current commit and the last tag #25

dpanza opened this issue Sep 19, 2022 · 0 comments

Comments

@dpanza
Copy link
Collaborator

dpanza commented Sep 19, 2022

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant