In order to release updates to your extensions, they must be hosted in a public Git repository on GitHub. Support for other hosts is in planning stages. If you'd like to request a specific host, please open an Issue on GitHub or a thread on the Feature Requests forum. After submitting your extension to the BigTree extensions database, updates are automatically polled from GitHub each night through the "master" branch. Only the master branch will be used for updates, so be sure to merge into the master branch for any updates you wish to publicly push out. You can also setup a GitHub Webhook to https://www.bigtreecms.org/ajax/extensions/webhook/ if you would like your releases to be immediately reflected in the BigTree extensions database rather than nightly.

Schema and Scripted Updates

If you make database changes to your extension or require custom code to be run after a user updates the extension, BigTree helps facilitate this in two ways:

Automatic Revisioning

When you edit an existing Extension and save it, BigTree automatically identifies changes to the included tables' structures and creates a revision log of MySQL queries needed to duplicate the structural changes made between the previously saved extension and the current state of the tables. This information is stored in the manifest.json file under "sql_revisions". An internal revision number is incremented each time your extension is saved (whether your table structures have changed or not). When a user updates your extension, their internal manifest revision will be compared against the new revision and each SQL statement will be run in order.

Even if you do not plan to release the .zip file for your extension directly (distributing only through GitHub) you still must edit and save your extension for automatic revisioning to kick in, save MySQL schema changes, and update your JSON manifest file. If you do not have any schema changes, you may release updates directly through GitHub

Update Script

If you need to translate data or require some kind post-update maintenance, you may do so in a file named "update.php" the root of your extension folder. This file will be included after the extension is updated. You should use your own revision tracking in this file -- it's not wise to use the automatic revision counter in the manifest as each save increments that number (so saving to include your new update.php script will increase the revision number which could cause issues if you are using that number in your update.php script).

The easiest way to maintain your own revision information would be to create a setting in your install.php script and read it in your update.php script to determine a user's current version.

Settings

Because settings can often contain user-submitted data, if you need to make changes to settings (including changing the field type) you should make these changes through your update.php script. Changes to settings will NOT automatically be populated through automatic revisioning. Newly created settings will come through, but deleted or changed settings will not be automatically revisioned.