How does Xenforo addon versioning really work?
The XF addon versioning is a bit messy, but makes sense when you get used to it.
You can play around with the widget below to get better familiarized with how it works. (It is a JavaScript-port of the XF Core PHP function)
What should the version_string
be set to?
If you use the correct format when bumping the version of your addon, the
version_string
will be set to the correct value
automagically
In other words, it is best to just let the php cmd.php xf-addon:bump-version command handle
the logic, and you should not manually edit the version_string
-value in the
addon.json
-file.
version_id
.
How to upload a resource
When uploading the resource and posting a release about the new version, you should do as follows:
(The
version_string
-value can be found from the addon.json
-file)
Playground
Enter a version_id
number below to see the correct version_string
that
will be
outputted to the addon.json
file (and which you should use as New version
number
when releasing a new version in XF pages.)
Extra notes on addon versioning
There are 2 undocumented "features" of the XF version_id
format..
- even states
-
In-between the version states (1, 3, 5, 7, 9) there are hidden ones (2, 4, 6, 8) that add 10 to the
"state version".
e.g.1020324
is equivalent to1.2.3 Alpha 14
- 90-prefix
-
You can "bump down" version numbers up to 4 times with the 90-prefix. This means that the
version_id
will be higher than previous version, but theversion_string
can be "reset" to a lower value. Example:
8040670
is8.4.6
, which is an older version than
901000070
which is1.0.0
(You should probably use this sparingly and only when really needed)