For Developers

Enabling Automatic Update Notifications and One-Click Updates to Your Module

To enable automatic update notifications and one-click updates for your Beaver Brewer module, you will need to ensure that your module.config file contains the following information:

Module Version: The most recent version of your module. You will need to increment this whenever you want to push out an update.

Update URL: The URL of a remote module.config file with which to compare versions when checking for module updates. The file at this URL should always contain the most recent version of your module. When Beaver Brewer checks for module updates, if will see if the module version in the remote file is higher than the user's currently-installed version of the module (and, if need be, notify him/her that an update is available).

Download ZIP: The URL of a remote ZIP file containing the latest version of your module. This must be a direct link to the ZIP file itself, and not a web page.

There is, of course, some other information you'll want to include inside your module.config file, but that's discussed elsewhere on this site.

 

Finding the Right URLs to Use in Your Module Config

You may be wondering what to use for the Update URL and Download ZIP URL mentioned above, but fortunately, if you use GitHub or Bitbucket to host your module code, we've already figured it out for you. Just substitute {username} with your actual username, and {reponame} with the name of your repository on GitHub or Bitbucket.

For GitHub Users: 

Make sure your repository is public and use the following URL patterns:

Module.config
https://raw.githubusercontent.com/{username}/{reponame}/master/module.config

Download ZIP
https://codeload.github.com/{username}/{reponame}/zip/master

For Bitbucket Users: 

Make sure your repository is public and use the following URL patterns:

Module.config
https://api.bitbucket.org/1.0/repositories/{username}/{reponame}/raw/master/module.config

Download ZIP
https://bitbucket.org/{username}/{reponame}/get/master.zip

But What If I'm Not Using GitHub or Bitbucket?

If you use another service to version control your code (or don't version control at all), you will still need to ensure that your module's raw code-- or at least your module.config file-- is hosted somewhere that's publicly accessible over HTTP. The URL of the hosted/remote module.config file is what you'll need to supply on the "Update URL" line so that Beaver Brewer can read and parse out the data it needs.

You will also need to ensure that your entire module package can be publicly downloaded as a ZIP archive over HTTP. The direct URL to your ZIP file is what you will use on the "Download ZIP" line of your module.config file.

Although we do recommend version controlling your code, Beaver Brewer does not require it. In theory, you could choose to only host your latest module.config file and most recent module ZIP archive somewhere on the web, updating the files manually (e.g., via FTP) whenever you release a new version of your module (as long as you include those URLs inside your module configuration file). That said, we still think it's easier (and less error-prone) to use git. If you've never used it before, now's a great time to learn it!