XF 2.2 Update .ZIP release name?

Fullmental

Active member
I'm sorry, I feel like I should know this. For context I'm very new to doing anything addon related and work within this scope VERY infrequently, so I basically have to relearn everything each time I touch an addon. So anyway, I have a stupidly simple addon I wrote two years ago and I made some changes to it today, so I wanted to build a new release. I went into addon.json and incremented the verion_id and string, but when I used xf-addon:build-release it zipped everything up under the OLD version name and overwrote my previous release zip file without even prompting me. I can pull a backup no problem to get that old code back, but what I don't understand is why it happened in the first place, or how to fix it so it properly builds a new version with the updated string in the zipped filename. Am I missing something basic here? Also, shouldn't there at least be a prompt before it overwrites an existing .zip package?
 
Solution
Use php cmd.php xf-addon:bump-version to bump the version. If you have edited the JSON manually, you would need to sync the changes with php cmd.php xf-addon:sync-json.
Use php cmd.php xf-addon:bump-version to bump the version. If you have edited the JSON manually, you would need to sync the changes with php cmd.php xf-addon:sync-json.
 
Solution
That would be a good suggestion. I would also call it a bug.
Erm, why should it be a bug?

Release ZIP files are basically just ephemeral build artifacts, XenForos job is to create them - not to persist them.
And ideally it should always be possible to recreate any release ZIP by just pulling the desired version from VCS (git, etc.), import into the development / build system and build.

It would be pretty annoying (at least to me) to always confirm overwriting, even if there was a flag to force this.
 
Last edited:
Erm, why should it be a bug?

Release ZIP files should are basically just ephemeral build artifacts, XenForos job is to create them - not to persist them.
And ideally it should always be possible to recreate any release ZIP by just pulling the desired version from VCS (git, etc.), import into the development / build system and build.

It would be pretty annoying (at leas to me) to always confirm overwriting, even if there was a flag to force this.

XenForo's current approach works well for someone with daily coding experience and years of expertise in building XenForo add-ons. With your high level of expertise, you're in a select group among those developing XenForo add-ons. However, a simple overwrite confirmation might be beneficial for the majority of add-on developers here. A flag is not the end of the world if it can help the many.

A bug because for the majority building add-ons, it could easily cause loss of data.
 
Back
Top Bottom