PyUpdater icon indicating copy to clipboard operation
PyUpdater copied to clipboard

Custom versioning

Open JessicaTegner opened this issue 4 years ago • 3 comments

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.

JessicaTegner avatar Jun 11 '21 14:06 JessicaTegner

@NicklasTegner I think this would be a good addition.

JMSwag avatar Jun 12 '21 22:06 JMSwag

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

JessicaTegner avatar Jun 13 '21 15:06 JessicaTegner

@NicklasTegner Give me a couple of days to ponder on this. As mentioned, we'll need something for the cli & client.

JMSwag avatar Jun 14 '21 17:06 JMSwag