4 ms·
I like the date-based version. But you can also use a combination of both. But a semantic version number in front, and the date behind. I use that for a couple
by albertzeyer 6y ago
I like the date-based version.
But you can also use a combination of both. But a semantic version number in front, and the date behind.
I use that for a couple of projects, e.g.:
https://pypi.org/project/better_exchook/ https://pypi.org/project/better_exchook/
Current version: 1.20200318.213331.
The date/time is taken from the latest Git commit. Via this code:
https://github.com/albertz/py_better_exchook/blob/2c106820ea334027ce585daa78cdfda753b918cc/setup.py#L96 https://github.com/albertz/py_better_exchook/blob/2c106820ea...
If I need to break the API, or want to change the versioning scheme, I can just increase the major version number.
For logging purpose, I also append the Git hash, and maybe "dirty", like this:
https://github.com/rwth-i6/returnn/blob/7fa1f3e0595247c035b2641de9952f9227669475/Util.py#L292 https://github.com/rwth-i6/returnn/blob/7fa1f3e0595247c035b2...
- mfer 6y agoAre you familiar with https://calver.org/ https://calver.org/