Closed ghost closed 2 years ago
Hi! This isn't an issue with Version.serialize
, but rather is a side effect of a bug fix. Dunamai's default tag pattern previously required versions with three parts (v0.3.0
), but that was an oversight, because Dunamai is meant to work also for other versioning systems like PEP 440 where 0.3
or 0.3.0.5
would be valid. So your v0.3
tag, which was previously ignored because it did not match the default pattern, is now being recognized as a version tag, so Dunamai tries to use it, but then it fails because it's invalid under Semantic Versioning (should be v0.3.0
).
If you can't or don't want to change the tags, then you can pass a custom pattern
to Version.from_git
. This was the previous one, if you want to use it as-is:
Hi! Thank you for the quick response. Yes, I investigated the issue a little bit more, you are correct. Thank you for the clarification.
Example:
Repository: https://github.com/splunk/addonfactory-ucc-generator
Traceback:
dunamai 1.5.5
version
:Version(base='0.1.0', stage=None, revision=None, distance=224, commit='5a020de', dirty=True, tagged_metadata=None)
dunamai 1.6.0
version
:Version(base='0.3', stage='beta', revision=0, distance=35, commit='5a020de', dirty=True, tagged_metadata=None)