XF 2.1 Correct way of upgrading an addon?

asprin

Active member
So I used the release command on version 1000030 to prepare the zip file and uploaded it to the remote server and installed the addon.

Now if I want to work on additional things related to the said addon locally, what would be the recommended way of dealing with upgrades?

Approach #1
  1. Bump the version to 1000130
  2. Start making changes to code/templates
  3. Once I'm done with the changes, use the release command to get the zip of the upgrade

Approach #2
  1. Start making changes to code/templates
  2. Bump the version to 1000130
  3. Use the release command after bumping to get the zip of the upgrade

I sincerely hope it's #2 because that's what I've followed. I've finished step 1 and about to use the bump command.

But if's #1, is there a way to ensure all my new changes get tagged to the newer version? I sure hope it doesn't involve going back to each changed file, making a fake edit and then saving it after running the bump command.
 
Solution
But if's #1, is there a way to ensure all my new changes get tagged to the newer version? I sure hope it doesn't involve going back to each changed file, making a fake edit and then saving it after running the bump command.
Unfortunately it's exactly that. Alternatively you can manually modify the metadata json and xf-dev:import afterwards.
But if's #1, is there a way to ensure all my new changes get tagged to the newer version? I sure hope it doesn't involve going back to each changed file, making a fake edit and then saving it after running the bump command.
Unfortunately it's exactly that. Alternatively you can manually modify the metadata json and xf-dev:import afterwards.
 
Solution
@Jeremy P it would be extremely useful if the official XenForo documentation included the exact steps to properly increase a build version. If it is there, I apologize because I looked and looked and could not find anything.

It seems that almost anyone who creates an add-on will likely need to go through this process before they ever release it publicly. I am still confused on the subject. A quick search will show some developers with many add-ons out publicly still seem to not agree on the best approach.

Bump then make changes? Make changes then bump? If I've done it wrong how do I fix it, so I get the add-on back on the right track? The exact steps for each of these would be very helpful.
 
The version should always be set at the beginning of the development life-cycle, immediately after the previous version is published. You just run php cmd.php xf-addon:bump-version to update it.

If you’ve forgotten, you’ll need to "touch" any development output you've changed since to make sure it has the correct version. There is a php cmd.php xf-dev:touch-template command for templates. Otherwise you can do this by editing and saving (reverting if necessary) the pertinent item. As pointed out, you can also manually edit the metadata and re-import.
 
Back
Top Bottom