|
| 1 | +--- |
| 2 | +title: Advanced Release Channels |
| 3 | +--- |
| 4 | + |
| 5 | +> **WARNING:** Channel features are in beta, run `npm install -g exp` to get the most up to date features. |
| 6 | +
|
| 7 | +## Introduction |
| 8 | + |
| 9 | +For a quick introduction to release channels, read [this](https://docs.expo.io/versions/latest/guides/release-channels.html). |
| 10 | + |
| 11 | +When you publish your app by running `exp publish --release-channel staging`, it creates: |
| 12 | + |
| 13 | +- a release, identified by a `publicationId` for Android and iOS platforms. A release refers to your bundled source code and assets at the time of publication. |
| 14 | +- a link to the release in the `staging` channel, identified by a `channelId`. This is like a commit on a git branch. |
| 15 | + |
| 16 | +For simplicity, the rest of this article will refer to just the `ios` releases, but you could swap out ios for android at any point and everything would still be true. |
| 17 | + |
| 18 | +## See past publishes |
| 19 | +You can see everything that you’ve published with `exp publish:history`. |
| 20 | + |
| 21 | +#### Example command and output |
| 22 | +`exp publish:history --platform ios` |
| 23 | + |
| 24 | +| publishedTime | appVersion | sdkVersion | platform | channel | channelId | publicationId | |
| 25 | +|---|---|---|---|---|---|---| |
| 26 | +| 2018-01-05T23:55:04.603Z | 1.0.0 | 24.0.0 | ios | staging | 9133d577 | d9bd6b80 | |
| 27 | + |
| 28 | +To see more details about this particular release, you can run `exp publish:details` |
| 29 | + |
| 30 | +#### Example command and output |
| 31 | +`exp publish:details --publish-id d9bd6b80` |
| 32 | + |
| 33 | +[](/_images/release-channels-pub-details-1.png) |
| 34 | + |
| 35 | + |
| 36 | +## What version of the app will my users get? |
| 37 | + |
| 38 | +Your users will get the most recent compatible release that was pushed to a channel. Factors that affect compatibility: |
| 39 | + |
| 40 | +- sdkVersion |
| 41 | +- platform |
| 42 | + |
| 43 | +The following flowchart shows how we determine which release to return to a user: |
| 44 | + |
| 45 | +[](/_images/release-channels-flowchart.png) |
| 46 | + |
| 47 | +## Promoting a release to a new channel |
| 48 | + |
| 49 | +Example use case: you previously published a release to `staging` and everything went well in your testing. Now you want this release to be active in another channel (ie) production |
| 50 | + |
| 51 | +We run `exp publish:set` to push our release to the `production` channel. |
| 52 | +`exp publish:set --publish-id d9bd6b80 --release-channel production` |
| 53 | + |
| 54 | +Continuing from the previous section, we can see that our release is available in both the `staging` and the `production` channels. |
| 55 | + |
| 56 | +`exp publish:history --platform ios` |
| 57 | + |
| 58 | +| publishedTime | appVersion | sdkVersion | platform | channel | channelId | publicationId | |
| 59 | +|---|---|---|---|---|---|---| |
| 60 | +| 2018-01-05T23:55:04.603Z | 1.0.0 | 24.0.0 | ios | staging | 9133d577 | d9bd6b80 | |
| 61 | +| 2018-01-05T23:55:04.603Z | 1.0.0 | 24.0.0 | ios | production | 6e406223 | d9bd6b80 | |
| 62 | + |
| 63 | +## Rollback a channel entry |
| 64 | + |
| 65 | +Example use case: you published a release to your `production` channel, only to realize that it includes a major regression for some of your users, so you want to revert back to the previous version. |
| 66 | + |
| 67 | +Continuing from the previous section, we rollback our `production` channel entry with `exp publish:rollback`. |
| 68 | + |
| 69 | +`exp publish:rollback --channel-id 6e406223` |
| 70 | + |
| 71 | +Now we can see that our release is no longer available in the production channel. |
| 72 | + |
| 73 | +`exp publish:history --platform ios` |
| 74 | + |
| 75 | +| publishedTime | appVersion | sdkVersion | platform | channel | channelId | publicationId | |
| 76 | +|---|---|---|---|---|---|---| |
| 77 | +| 2018-01-05T23:55:04.603Z | 1.0.0 | 24.0.0 | ios | staging | 9133d577 | d9bd6b80 | |
| 78 | + |
| 79 | +## Release channels CLI tools |
| 80 | +### Publish history |
| 81 | + |
| 82 | +``` |
| 83 | + Usage: exp publish:history [--release-channel <channel-name>] [--count <number-of-logs>] |
| 84 | +
|
| 85 | + View a log of your published releases. |
| 86 | +
|
| 87 | + Options: |
| 88 | + -c, --release-channel <channel-name> Filter by release channel. If this flag is not included, the most recent publications will be shown. |
| 89 | + -count, --count <number-of-logs> Number of logs to view, maximum 100, default 5. |
| 90 | +``` |
| 91 | + |
| 92 | +### Publish details |
| 93 | +``` |
| 94 | + Usage: exp publish:details --publish-id <publish-id> |
| 95 | + View the details of a published release. |
| 96 | +
|
| 97 | + Options: |
| 98 | + --publish-id <publish-id> Publication id. (Required) |
| 99 | +``` |
| 100 | + |
| 101 | +### Publish rollback |
| 102 | +``` |
| 103 | +Usage: exp publish:rollback --channel-id <channel-id> |
| 104 | +
|
| 105 | + Rollback an update to a channel. |
| 106 | +
|
| 107 | + Options: |
| 108 | + --channel-id <channel-id> The channel id to rollback in the channel. (Required) |
| 109 | +``` |
| 110 | + |
| 111 | +### Publish set |
| 112 | +``` |
| 113 | + Usage: exp publish:set --release-channel <channel-name> --publish-id <publish-id> |
| 114 | +
|
| 115 | + Set a published release to be served from a specified channel. |
| 116 | +
|
| 117 | + Options: |
| 118 | + -c, --release-channel <channel-name> The channel to set the published release. (Required) |
| 119 | + -p, --publish-id <publish-id> The id of the published release to serve from the channel. (Required) |
| 120 | +``` |
0 commit comments