Update channels
Update channels allow you to manage different types of releases for your plugin. Using them, you can host alpha, beta, release candidate (RC), and stable versions of your plugins. This allows users to select their update channel and decide whether to receive updates for alpha, beta, or only stable releases.
You can enable users to select their preferred update channel by setting the relevant options for our WordPress integration or provide your own settings page and pass the selected channel to the WunderUpdates class register()
method.
Semantic versioning
WunderUpdates follows the semantic versioning guidelines for version numbers, and we use the standard javascript semver
library to determine which version is newer. To take full advantage of update channels, you should also follow the semantic versioning guidelines for your plugin. We can not guarantee that the update channels work as expected if you don't follow these guidelines.
Supported channels
WunderUpdates supports the following channels by name:
Channel | Description |
---|---|
alpha | Alpha releases are early releases of your plugin. They are not stable and may contain bugs. |
beta | Beta releases are more stable than alpha releases but may still contain bugs. |
rc | Release candidates are almost stable releases. They are the last step before a stable release. |
stable | Stable releases are the final releases of your plugin. They are stable and contain no known bugs. |
Each channel should be interpreted as "the least acceptable stability." If the same (numeric) version is available in a more stable channel, it will also be considered the latest version for the lower stability channels.
Practical example
To clarify how this works, let's look at an example when adding plugin versions to WunderUpdates:
Publish 1.0.0
You first upload version 1.0.0
of your plugin. WunderUpdates will treat this as a stable release and make it available to all users.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.0.0 |
Beta | 1.0.0 |
Alpha | 1.0.0 |
Publish 1.0.0-alpha.1
Next, you release version 1.1.0-alpha.1
of your plugin as an alpha release. Only users who have selected the alpha channel will see this update.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.0.0 |
Beta | 1.0.0 |
Alpha | 1.1.0-alpha.1 |
Publish 1.1.0-beta.1
A week later, you upload version 1.1.0-beta.1
of your plugin as a beta release. Since "beta" is considered more stable than "Alpha", all users who have selected either the beta channel OR the alpha channel will see this as the latest version.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.0.0 |
Beta | 1.1.0-beta.1 |
Alpha | 1.1.0-beta.1 |
Publish 1.1.0-beta.2
Two weeks later, you upload version 1.1.0-beta.2
of your plugin as a new beta release. All users who have selected either the alpha channel OR the beta channel will see this as the latest version.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.0.0 |
Beta | 1.1.0-beta.2 |
Alpha | 1.1.0-beta.2 |
Publish 2.0.0-alpha.1
In parallel, you're working on some new features that will become version 2.0.0 and upload version 2.0.0-alpha.1
of your plugin. Because 2.0.0
is higher than 1.1.0
, users who have selected the alpha will see 2.0.0-alpha.1
as the latest version. Beta users still only see 1.1.0-beta.2
while RC and stable users can only get the old trusty 1.0.0
.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.0.0 |
Beta | 1.1.0-beta.2 |
Alpha | 2.0.0-alpha.1 |
Publish 1.1.0-rc.1
You are getting close to releasing the real thing, but first, you upload 1.1.0-rc.1
of your plugin as a release candidate. As "RC" is more stable than "beta" and the latest version in both channels has the same version number, both RC and beta users will now see 1.1.0-rc.1
as the latest available version. Stable users are, of course, still seeing 1.0.0
. But alpha users can access an even higher version, so they will see 2.0.0-alpha.1
.
Channel | Latest available version |
---|---|
Stable | 1.0.0 |
RC | 1.1.0-rc.1 |
Beta | 1.1.0-rc.1 |
Alpha | 2.0.0-alpha.1 |
Publish 1.1.0 (stable)
Finally, you upload version 1.1.0
of your plugin as a stable release. All stable users will see this update, and since a stable release is the most stable channel, so will RC and beta users. However, alpha users still have access to an even higher version, 2.0.0-alpha.1
, so they see it as their latest version.
Channel | Latest available version |
---|---|
Stable | 1.1.0 |
RC | 1.1.0 |
Beta | 1.1.0 |
Alpha | 2.0.0-alpha.1 |
How to use update channels
You don't have to configure anything special to get started with update channels. They just work. Just be aware of that WunderUpdates only recognizes stable
, rc
, beta
and alpha
as channel names. Any other prerelease naming will be ignored.
Access via the API
To get info about and/or download the latest version in a specific channel, you need to add the channel name as a URL segment:
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world/alpha
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world/beta
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world/rc
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world/stable
If you don't specify a channel, stable
is assumed, and the following two commands are equal:
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world/stable
curl -X GET https://api.wunderupdates.com/v1/public/abcde123/plugins/hello-world
In a WordPress plugin
Your WordPress plugin must allow the end user to select the update channel or set it for them using code. When using our WordPress integration class, this is as easy as adding allow_channels
to the config:
require_once __DIR__ . '/wunderupdates.php';
$updates = new WunderUpdates_abcde123_hello_world( array(
$updates->register(
array(
'plugin_name' => 'Hello World',
'slug' => 'hello-world',
'version' => '1.0.0',
'full_path' => __FILE__,
'account_key' => 'abcde123',
'allow_channels' => true,
)
);
This will render a channel selection link on your plugin row on the WordPress plugins page. Using this link, your end users can select the preferred channel themselves.