Bumping an Add-on version is a boring, tedious and sometimes quite error-prone routine task:
We either have to edit
In most cases, version changes are simple and and predictable, so couldn't this process be simplified?
My suggestion is to make a few changes to this command:
We either have to edit
version_id
and version_string
in addon.json
, pass at least option version-id
on the commandline or interactively enter it in the console.version_id
is great for automatic processing, but somewhat hard to read (and way too easy to mess up) for humans.In most cases, version changes are simple and and predictable, so couldn't this process be simplified?
My suggestion is to make a few changes to this command:
- Add an new option
---auto
with optional valuesminor
andmajor
If this option is passed on the commandline, the next version is chosen automatically according to this algorithm:
If state is stable reset state version to 0 and increase patch version (or minor / major if value is set; remeining version bits are reset to zero if used)
If state is alpha, beta or rc increase state version, error if that would overflow (eg. state version > 19) or if optional value is set
Error in all other cases - Add a new option
--state
with optional valuesalpha
,beta
andrc
If this is passed on the commandline together with--auto
, state is alpha, beta or rc and no value is set do not increase patch version but increase state version instead, error if that would overflow (eg. state version > 19)
If one of the optional values is set increase patch version and set state as specified
Error in all other cases - Change the code so version id can be infered from version string if only that is given on the commandline
xf-addon:bump-version --auto --state
for hot fixesxf-addon:bump-version --auto
for normal maintenance updatesxf-addon:bump-version --auto minor --state beta
to start beta for a new minor version or go straight to a new minor version withxf-addon:bump-version --auto minor
Last edited:
Upvote
7