From 3528b2d9cf056a53d551dcd348b5f0388b6c83f4 Mon Sep 17 00:00:00 2001 From: popod Date: Fri, 16 Feb 2018 22:35:39 +0100 Subject: [PATCH 01/10] First basic draft --- docs/tutorials/release-using-channels.md | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/tutorials/release-using-channels.md diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md new file mode 100644 index 00000000000..6ca90c0af7f --- /dev/null +++ b/docs/tutorials/release-using-channels.md @@ -0,0 +1,63 @@ +> !!! This documentation is in "beta" and needed to be tested !!! + +## Auto-updates with channels / Releasing with channels + +### Description + +Channels are usfull to distribute "beta" or "alpha" releases version of your application to a choosen set of your users. This allow your to test your application before release it as a "stable" version. + +Users which receivs "beta" version of your app will get "stable" versions too when it will be released. Otherwhise users who doesn't wanna beta version will only get "stable" releases. + +They are tree channels level ordered by stability : +1. "stable", your application is stable and this is the default one (example version 1.3.2) +2. "beta" which mean your application works, but should have some bugs (example version 1.3.2-beta) +3. "alpha" which mean your application is not stable and in active development (example version 1.3.2-alpha) + +See more about that in xxxxx -> links with more channels informations. + + +### Configuration + +#### Electron-Builder + +By default (without using channels), all your application releases use the "stable" channel. + +If you want to use channels, you should add this to your package.json + +``` +"version": "x.x.x-beta", +... +"build": { + "generateUpdatesFilesForAllChannels": true, + ... +} +``` + +> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you doesn't need to add it. + +All you have to do to release version in a channel is to set the `package.json` version. Add "-beta" or "-alpha" (nothing for stable) to the version number to automatically build for the related channel. + + +#### Your application + +All you need to do here is to define which channel the user will receive. + +`autoUpdater.setFeedURL({url: 'https://www.yoursite.com', channel: 'beta'});` + +> note: remove the need to define url ! + +The folower related versions will be distributed to the users according to channel you set in `setReedURL()` : +- "stable": users will only get "stable" versions +- "beta": users will get "beta" and "stable" version +- "alpha": users will get "alpha", "beta" and "stable" version + + +### How to use it / Example + +Imagine your application is in version 1.0.1 (stable). + +If you want to release a beta for your 1.1.0 version, you only need to define your package.json "version" to "1.1.0-beta". + +And when your application is stable enouth and you want to release the version for all your users, only remove the "-beta" tag from your package.json "version". + + From 06ec1564b9e8970fa66ac41a820f17a566e308bf Mon Sep 17 00:00:00 2001 From: popod Date: Fri, 16 Feb 2018 22:47:01 +0100 Subject: [PATCH 02/10] Update summary with new tutorial link --- docs/SUMMARY.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 1cc3f771ead..773c83296fa 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -26,8 +26,9 @@ * [Loading App Dependencies Manually](tutorials/loading-app-dependencies-manually.md) * [Two package.json Structure](tutorials/two-package-structure.md) * [macOS Kernel Extensions](tutorials/macos-kernel-extensions.md) + * [Release using channels](tutorials/release-using-channels.md) * Programmatic API * [electron-builder](api/electron-builder.md) -* [Donate](donate.md) \ No newline at end of file +* [Donate](donate.md) From a1944e5603094cd0f3f37e71b16fa82a0308d771 Mon Sep 17 00:00:00 2001 From: popod Date: Sat, 17 Feb 2018 08:29:26 +0100 Subject: [PATCH 03/10] Doc improvments --- docs/tutorials/release-using-channels.md | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index 6ca90c0af7f..a08311ea96b 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -1,28 +1,25 @@ > !!! This documentation is in "beta" and needed to be tested !!! -## Auto-updates with channels / Releasing with channels +# Release using channels / Auto-updates with channels -### Description +## Description +Channels are useful to distribute "beta" or "alpha" releases of your application to a choosen set of users. This allow to test an application before release it as "stable". -Channels are usfull to distribute "beta" or "alpha" releases version of your application to a choosen set of your users. This allow your to test your application before release it as a "stable" version. - -Users which receivs "beta" version of your app will get "stable" versions too when it will be released. Otherwhise users who doesn't wanna beta version will only get "stable" releases. +Users which receive "beta" version will get "stable" versions too. Otherwise users who doesn't wanna "beta" will only get "stable" releases. They are tree channels level ordered by stability : -1. "stable", your application is stable and this is the default one (example version 1.3.2) -2. "beta" which mean your application works, but should have some bugs (example version 1.3.2-beta) -3. "alpha" which mean your application is not stable and in active development (example version 1.3.2-alpha) - -See more about that in xxxxx -> links with more channels informations. +1. "stable", your application is stable and this is the default one (example: 1.3.2) +2. "beta" which mean your application works, but should have some bugs (example: 1.3.2-beta) +3. "alpha" which mean your application is not stable and in active development (example: 1.3.2-alpha) -### Configuration +## Configuration +To release using channels, you should config electron-builder and define the channels to use in client side. -#### Electron-Builder +### Electron-Builder +By default (without using channels), all application releases use the "stable" channel. -By default (without using channels), all your application releases use the "stable" channel. - -If you want to use channels, you should add this to your package.json +If you want to use channels, you should add this to your package.json: ``` "version": "x.x.x-beta", @@ -33,31 +30,34 @@ If you want to use channels, you should add this to your package.json } ``` -> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you doesn't need to add it. - -All you have to do to release version in a channel is to set the `package.json` version. Add "-beta" or "-alpha" (nothing for stable) to the version number to automatically build for the related channel. +> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you doesn't need to set it. +All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for stable) to automatically build for the related channel. -#### Your application +### Your application All you need to do here is to define which channel the user will receive. `autoUpdater.setFeedURL({url: 'https://www.yoursite.com', channel: 'beta'});` > note: remove the need to define url ! -The folower related versions will be distributed to the users according to channel you set in `setReedURL()` : +The following versions will be distributed to the users according to the channel you set in `setFeedURL()` : - "stable": users will only get "stable" versions - "beta": users will get "beta" and "stable" version - "alpha": users will get "alpha", "beta" and "stable" version -### How to use it / Example +### Advanced (optional) +todo: +- allow downgrade +- -Imagine your application is in version 1.0.1 (stable). +## How to use it / Example +Imagine your application version is 1.0.1 (stable). -If you want to release a beta for your 1.1.0 version, you only need to define your package.json "version" to "1.1.0-beta". +If you want to release a beta for the 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". -And when your application is stable enouth and you want to release the version for all your users, only remove the "-beta" tag from your package.json "version". +And when your application is stable enouth and you want to release it to all users, only remove the "-beta" tag from the package.json "version" tag. From 43435e1c3aacc1ea7b390435cc24063efd3163fc Mon Sep 17 00:00:00 2001 From: popod Date: Wed, 28 Feb 2018 22:09:56 +0100 Subject: [PATCH 04/10] Improve documentation based on feedbacks --- docs/tutorials/release-using-channels.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index a08311ea96b..a675e6b119e 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -1,6 +1,6 @@ > !!! This documentation is in "beta" and needed to be tested !!! -# Release using channels / Auto-updates with channels +# Release Using Channels / Auto-Updates With Channels ## Description Channels are useful to distribute "beta" or "alpha" releases of your application to a choosen set of users. This allow to test an application before release it as "stable". @@ -8,9 +8,9 @@ Channels are useful to distribute "beta" or "alpha" releases of your application Users which receive "beta" version will get "stable" versions too. Otherwise users who doesn't wanna "beta" will only get "stable" releases. They are tree channels level ordered by stability : -1. "stable", your application is stable and this is the default one (example: 1.3.2) -2. "beta" which mean your application works, but should have some bugs (example: 1.3.2-beta) -3. "alpha" which mean your application is not stable and in active development (example: 1.3.2-alpha) +1. "stable", your application is stable and this is the default one (example: "1.3.2") +2. "beta" which mean your application works, but should have some bugs (example: "1.3.2-beta") +3. "alpha" which mean your application is not stable and in active development (example: "1.3.2-alpha") ## Configuration @@ -35,25 +35,23 @@ If you want to use channels, you should add this to your package.json: All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for stable) to automatically build for the related channel. -### Your application +### Your Application All you need to do here is to define which channel the user will receive. -`autoUpdater.setFeedURL({url: 'https://www.yoursite.com', channel: 'beta'});` +`autoUpdater.channel('beta')` -> note: remove the need to define url ! - -The following versions will be distributed to the users according to the channel you set in `setFeedURL()` : -- "stable": users will only get "stable" versions +The following versions will be distributed to users depending on the channel defined: +- "stable" or nothing: users will only get "stable" versions - "beta": users will get "beta" and "stable" version - "alpha": users will get "alpha", "beta" and "stable" version ### Advanced (optional) todo: -- allow downgrade +- `allowDowngrade` - -## How to use it / Example +## How To Use It / Example Imagine your application version is 1.0.1 (stable). If you want to release a beta for the 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". From dedc0e99169d25dd913b0adf64a019511b1c9c99 Mon Sep 17 00:00:00 2001 From: popod Date: Wed, 28 Feb 2018 22:34:51 +0100 Subject: [PATCH 05/10] Add documentation for autoUpdater.channel() --- docs/auto-update.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/auto-update.md b/docs/auto-update.md index ee09486448b..97eccb4dcd9 100644 --- a/docs/auto-update.md +++ b/docs/auto-update.md @@ -130,6 +130,7 @@ Emitted on progress. * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.channel()`](#module_electron-updater.AppUpdater+channel) * [`.quitAndInstall(isSilent, isForceRunAfter)`](#module_electron-updater.AppUpdater+quitAndInstall) * [`.Logger`](#Logger) * [`.debug(message)`](#module_electron-updater.Logger+debug) @@ -168,6 +169,7 @@ Emitted on progress. * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.channel()`](#module_electron-updater.AppUpdater+channel) * [`.quitAndInstall(isSilent, isForceRunAfter)`](#module_electron-updater.AppUpdater+quitAndInstall) @@ -190,9 +192,15 @@ Start downloading update manually. You can use this method if `autoDownload` opt #### `appUpdater.setFeedURL(options)` Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish.md#genericserveroptions) will be set with value as `url`. - - options [PublishConfiguration](/configuration/publish.md#publishconfiguration) | String | [GithubOptions](/configuration/publish.md#githuboptions) | [S3Options](/configuration/publish.md#s3options) | [SpacesOptions](/configuration/publish.md#spacesoptions) | [GenericServerOptions](/configuration/publish.md#genericserveroptions) | [BintrayOptions](/configuration/publish.md#bintrayoptions) - If you want to override configuration in the `app-update.yml`. + +#### `appUpdater.channel()` (getter) +Get the current channel. + +#### `appUpdater.channel(option)` (setter) +Define the channel which the Auto-Updater will follow (see [the auto-update with channels tutorial](/tutorials/release-using-channels.md). `option` is a `string` which define the channel (like `option='beta'`). + #### `appUpdater.quitAndInstall(isSilent, isForceRunAfter)` Restarts the app and installs the update after it has been downloaded. From 130311e6a7155cd51c7813b8acef69c10554fc97 Mon Sep 17 00:00:00 2001 From: popod Date: Wed, 28 Feb 2018 22:51:07 +0100 Subject: [PATCH 06/10] Improve the documentation --- docs/auto-update.md | 8 +++----- docs/tutorials/release-using-channels.md | 12 +++--------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/auto-update.md b/docs/auto-update.md index 97eccb4dcd9..44d5a518558 100644 --- a/docs/auto-update.md +++ b/docs/auto-update.md @@ -192,14 +192,12 @@ Start downloading update manually. You can use this method if `autoDownload` opt #### `appUpdater.setFeedURL(options)` Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish.md#genericserveroptions) will be set with value as `url`. + - options [PublishConfiguration](/configuration/publish.md#publishconfiguration) | String | [GithubOptions](/configuration/publish.md#githuboptions) | [S3Options](/configuration/publish.md#s3options) | [SpacesOptions](/configuration/publish.md#spacesoptions) | [GenericServerOptions](/configuration/publish.md#genericserveroptions) | [BintrayOptions](/configuration/publish.md#bintrayoptions) - If you want to override configuration in the `app-update.yml`. -#### `appUpdater.channel()` (getter) -Get the current channel. - -#### `appUpdater.channel(option)` (setter) -Define the channel which the Auto-Updater will follow (see [the auto-update with channels tutorial](/tutorials/release-using-channels.md). `option` is a `string` which define the channel (like `option='beta'`). +#### `appUpdater.channel` (getter and setter) +Define the channel which the Auto-Updater will follow (see [the auto-update with channels tutorial](tutorials/release-using-channels.md#release_using_channels)) using `appUpdater.channel = 'beta'` or get the current channel with `currentChannel = appUpdater.channel`. #### `appUpdater.quitAndInstall(isSilent, isForceRunAfter)` diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index a675e6b119e..64a41ef79cf 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -1,5 +1,4 @@ -> !!! This documentation is in "beta" and needed to be tested !!! - + # Release Using Channels / Auto-Updates With Channels ## Description @@ -36,9 +35,9 @@ All you have to do to release using channels is to define the channel in the ver ### Your Application -All you need to do here is to define which channel the user will receive. +All you need to do here is to define which channel the user will receive with: -`autoUpdater.channel('beta')` +`autoUpdater.channel = 'beta'` (see [the documentation here](../auto-update.md#module_electron-updater.AppUpdater+channel)) The following versions will be distributed to users depending on the channel defined: - "stable" or nothing: users will only get "stable" versions @@ -46,11 +45,6 @@ The following versions will be distributed to users depending on the channel def - "alpha": users will get "alpha", "beta" and "stable" version -### Advanced (optional) -todo: -- `allowDowngrade` -- - ## How To Use It / Example Imagine your application version is 1.0.1 (stable). From 83e7d48965381f763c69c67884d2f751addfa959 Mon Sep 17 00:00:00 2001 From: Sebastien Toth Date: Wed, 7 Mar 2018 10:27:39 +0100 Subject: [PATCH 07/10] Fix some typos --- docs/tutorials/release-using-channels.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index 64a41ef79cf..f6ef79b52f7 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -2,14 +2,14 @@ # Release Using Channels / Auto-Updates With Channels ## Description -Channels are useful to distribute "beta" or "alpha" releases of your application to a choosen set of users. This allow to test an application before release it as "stable". +Channels are useful to distribute "beta" or "alpha" releases of your application to a chosen set of users. This allows to test an application before release it as "stable". -Users which receive "beta" version will get "stable" versions too. Otherwise users who doesn't wanna "beta" will only get "stable" releases. +Users which receive "beta" version will get "stable" versions too. Otherwise, users who don't want "beta" will only get "stable" releases. -They are tree channels level ordered by stability : +There are three channels, ordered by stability: 1. "stable", your application is stable and this is the default one (example: "1.3.2") -2. "beta" which mean your application works, but should have some bugs (example: "1.3.2-beta") -3. "alpha" which mean your application is not stable and in active development (example: "1.3.2-alpha") +2. "beta" which means your application works, but should have some bugs (example: "1.3.2-beta") +3. "alpha" which means your application is not stable and in active development (example: "1.3.2-alpha") ## Configuration @@ -29,7 +29,7 @@ If you want to use channels, you should add this to your package.json: } ``` -> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you doesn't need to set it. +> Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you don't need to set it. All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for stable) to automatically build for the related channel. @@ -50,6 +50,6 @@ Imagine your application version is 1.0.1 (stable). If you want to release a beta for the 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". -And when your application is stable enouth and you want to release it to all users, only remove the "-beta" tag from the package.json "version" tag. +And when your application is stable enough and you want to release it to all users, only remove the "-beta" tag from the package.json "version" tag. From a70e1ca29810a4501064ddecfea2c3280c996084 Mon Sep 17 00:00:00 2001 From: popod Date: Wed, 7 Mar 2018 19:38:34 +0100 Subject: [PATCH 08/10] Improve the "how to use it" section --- docs/tutorials/release-using-channels.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index f6ef79b52f7..03afe1e4b62 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -46,10 +46,8 @@ The following versions will be distributed to users depending on the channel def ## How To Use It / Example -Imagine your application version is 1.0.1 (stable). - -If you want to release a beta for the 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". - -And when your application is stable enough and you want to release it to all users, only remove the "-beta" tag from the package.json "version" tag. +Imagine that your application is stable and in version 1.0.1. +If you want to release a beta for the new 1.1.0 version, you only need to update the package.json "version" with "1.1.0-beta". +When your application is stable enough, you want to release it to all users. For that, you only need to remove the "-beta" label from the package.json "version" tag. From e2d0339a20cc0c1e1fee5d2563b21c34e3433071 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Wed, 7 Mar 2018 20:55:00 +0100 Subject: [PATCH 09/10] Title Should be Uppercased --- docs/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 773c83296fa..98faaded96d 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -26,7 +26,7 @@ * [Loading App Dependencies Manually](tutorials/loading-app-dependencies-manually.md) * [Two package.json Structure](tutorials/two-package-structure.md) * [macOS Kernel Extensions](tutorials/macos-kernel-extensions.md) - * [Release using channels](tutorials/release-using-channels.md) + * [Release Using Channels](tutorials/release-using-channels.md) * Programmatic API * [electron-builder](api/electron-builder.md) From ea268bed1037000eeb3728b4659d7f0061b1b36c Mon Sep 17 00:00:00 2001 From: popod Date: Thu, 22 Mar 2018 13:34:21 +0100 Subject: [PATCH 10/10] Replace "stable" with "latest" --- docs/tutorials/release-using-channels.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md index 03afe1e4b62..faf9f9c372a 100644 --- a/docs/tutorials/release-using-channels.md +++ b/docs/tutorials/release-using-channels.md @@ -2,12 +2,12 @@ # Release Using Channels / Auto-Updates With Channels ## Description -Channels are useful to distribute "beta" or "alpha" releases of your application to a chosen set of users. This allows to test an application before release it as "stable". +Channels are useful to distribute "beta" or "alpha" releases of your application to a chosen set of users. This allows to test an application before release it as "latest" (stable). -Users which receive "beta" version will get "stable" versions too. Otherwise, users who don't want "beta" will only get "stable" releases. +Users which receive "beta" version will get "latest" versions too. Otherwise, users who don't want "beta" will only get "latest" releases. There are three channels, ordered by stability: -1. "stable", your application is stable and this is the default one (example: "1.3.2") +1. "latest", your application is stable and this is the default one (example: "1.3.2") 2. "beta" which means your application works, but should have some bugs (example: "1.3.2-beta") 3. "alpha" which means your application is not stable and in active development (example: "1.3.2-alpha") @@ -16,7 +16,7 @@ There are three channels, ordered by stability: To release using channels, you should config electron-builder and define the channels to use in client side. ### Electron-Builder -By default (without using channels), all application releases use the "stable" channel. +By default (without using channels), all application releases use the "latest" channel. If you want to use channels, you should add this to your package.json: @@ -31,7 +31,7 @@ If you want to use channels, you should add this to your package.json: > Note: `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you don't need to set it. -All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for stable) to automatically build for the related channel. +All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for "latest") to automatically build for the related channel. ### Your Application @@ -40,9 +40,9 @@ All you need to do here is to define which channel the user will receive with: `autoUpdater.channel = 'beta'` (see [the documentation here](../auto-update.md#module_electron-updater.AppUpdater+channel)) The following versions will be distributed to users depending on the channel defined: -- "stable" or nothing: users will only get "stable" versions -- "beta": users will get "beta" and "stable" version -- "alpha": users will get "alpha", "beta" and "stable" version +- "latest" or nothing: users will only get "latest" versions +- "beta": users will get "beta" and "latest" version +- "alpha": users will get "alpha", "beta" and "latest" version ## How To Use It / Example