String versions for add-ons

Currently add-ons use a three-integer tuple like (1, 2, 3) as version number. This is nice for easily sorting things, but it has certain downsides. One thing I really miss is the ability to add string suffixes. For example, I would love to have version 2.0-beta1 for the upcoming 2.0 release of the Blender Cloud add-on. Or, right after releasing version 2.0, bump the version in the Git repository to 2.1-dev so that anyone using an unreleased revision from Git has this clearly showing in the interface.

What do you think? Do we want to move to a string-based versioning system so that we can have those suffixes? Or is there some other way to effectively reach the same goal?

Generally i don’t mind. But can you already do that ?
Like:
“version” = (1, 0, 3, “dev”),

I though that the version number is just a tuple.
test_naming

1 Like

@lijenstina is right. Integers aren’t enforced, you can even use floats.

'version': ('cool', 'version', 2.3333),

version

Would rather not support strings in the version number - if the version is always integers that increase it makes things simple to compare & reason about (new versions are always compare as greater).

That it happens not to cause an error with the current UI is not a reason to start adding in other kinds of values (current docs state it’s to be a tuple of int’s).

Instead we can support something similar to Blender’s BLENDER_VERSION_CYCLE which can be set to alpha / rc / release. A different name might make sense for add-ons. We could call it version_suffix which can be set to whatever you like. dev, stable pre-alpha etc. Which is just to show information about the version and never used in comparisons.