PyUpdater
PyUpdater copied to clipboard
Custom versioning
Hi.
With more and more projects moving from semver versioning, to other formats of versioning (year versioning, patch versioning etc)
Would it be possible to implement different strategies of versioning.
My suggestion is to give the Version class as a part of the PyUpdater constructor or as a settable before calling any updater checker methods.
The Version class would hold information about how to compare versions, etc.
What do you think.
@NicklasTegner I think this would be a good addition.
I'm trying to figure out how to do this in the best way.
The end goal, should be that existing projects continues to work (which would be, to set semver versioning as the default).
I see that the current "Version" class is imported from dsdev_utils.helpers.
In the client code, I would say to have a Version immutable, like.
client.version = Version.SEMVER_VERSIONING
client.version = Version.CalendarVersioning
It would need to both be set in the client code like above, and set somehow in the cli (like the below)
pyupdater build --app-version=2021.06.13 ...
pyupdater build --app-version=1.2.3 ...
Since we aren't doing any comparing and stuff in the cli, we would not need to do much here.
What do you think, how would you implement it @JMSwag
@NicklasTegner Give me a couple of days to ponder on this. As mentioned, we'll need something for the cli & client.