XF 2.3 Version ID question

https://xenforo.com/docs/dev/add-on-structure/#recommended-version-id-format

According to the documentation the version id has these parts
  1. aa represents the major version
  2. bb represents the minor version
  3. cc represents the patch version
  4. d represents the state, e.g. 1 for alpha releases, 3 for beta releases, 5 for release candidates and 7 for stable releases
  5. e represents the state version
But does this not mean that when we first create an addon the version should be 0100010 instead of 1000010 Would this not mean that it starts at version 10.0.0 Alpha?
 
It is so frickin confusing. Took me me a long time to figure it out.
It definitly is and IMHO waaay too easy to mess up and thus not really developer friendly.
But it is like it is ....

 
It definitly is and IMHO waaay too easy to mess up and thus not really developer friendly.
But it is like it is ....

Good post!
 
It definitly is and IMHO waaay too easy to mess up and thus not really developer friendly.

The key aspect of version ids is that they should only ever increase numerically. The fundamental upgrade logic within the XenForo core uses simple arithmetic comparison to differentiate between versions and allow incremental upgrades (eg how you can upgrade from XF 1.5 to XF 2.3 without anything breaking because it actually steps through every upgrade along the way).

But then we have to map that to developer-friendly versions where they may want alpha releases, beta releases, patch releases, major versions, minor versions, and everything in between.

It may be confusing at first, but once you get the hang of it, it is very consistent and logical and achieves that goal nicely.

To be fair though, when I first started developing addons, I did document the scheme on a piece of paper and had that stuck up on something visible for a few years as a reference until I got it into my head.

It works well and if you make a mistake, that's what version control if for ... and the -f parameter fixes things if you get it wrong and need to go back to a lower version.
 
Back
Top Bottom