@revopush/code-push-cli 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,774 +1,667 @@
1
- # CodePush CLI
1
+ ## 1. Introduction
2
2
 
3
- The CodePush CLI is a Node.js application that allows users to interact with CodePush Server.
3
+ Over-the-air (OTA) updates are a vital aspect of modern mobile application development,
4
+ enabling developers to push updates directly to users' devices without requiring them to download a new app version from the store.
4
5
 
5
- ## Installation
6
+ This step-by-step guide will walk you through the process of migrating your OTA updates from Appcenter to Revopush
7
+ whether you’re an experienced developer familiar with Appcenter or a beginner exploring Revopush applying OTA for your app from scratch.
6
8
 
7
- To run the CodePush CLI, follow these steps:
9
+ Guide contains the following steps:
8
10
 
9
- 1. Clone the CodePush Service repository.
10
- 1. Install the necessary dependencies by running `npm install`.
11
- 1. Build the CLI by running `npm run build`.
12
- 1. Install CLI globally by running `npm install -g`.
11
+ - Pre-requisites. Just a few things you need to have installed or updated before you start.
12
+ If you did not use Appcenter OTA updates before and just wish to apply OTA on top of Revopush for your app go right to the step 2.2
13
+ - Appcenter to Revopush migration. This section will guide you through the process of migrating your applications, deployments from Appcenter to Revopush.
14
+ If you did not use Appcenter OTA updates before and just wish to apply OTA on top of Revopush for your app feel free to skip this section and go to section 4.
15
+ - Create Application and Deployments in Revopush. This section will guide you through the process of creation of application, deployments in Revopush.
16
+ - Migrate your React Native application to Revopush OTA. There we describe required changes in your React Native application to start using Revopush OTA.
17
+ - Summary. This section will summarize the key points of the guide and provide you with additional resources to help you get the most out of Revopush.
13
18
 
14
- ## Getting started
19
+ Let’s get started!
15
20
 
16
- 1. Create a [CodePush account](#account-creation) push using the CodePush CLI.
17
- 1. Register your app with CodePush, and optionally share it with other developers on your team.
18
- 1. CodePush-ify your app and point it at the deployment you wish to use.
19
- 1. Release an update for your app.
20
- 1. Check out the debug logs to ensure everything is working as expected.
21
+ ## 2. Prerequisites
21
22
 
22
- ## Usage
23
+ Whether you start from scratch or migrate from Appcenter to Revopush,
24
+ you need necessary developer tools installed on your machine (eg [Node.js](https://nodejs.org/en), npm, yarn, npx, Android Studio, Xcode, VS Code, etc.)
25
+ which you used to use for your React Native application development. You should have permissions to install npm packages globally for further CodePush updates.
23
26
 
24
- After installing CodePush CLI globally, it will be available under `code-push-standalone`.
27
+ Create an account on [Revopush](https://app.revopush.org/register) to manage your applications and deployments via both UI and CLI
28
+ using GitHub or Google as an authentication provider.
25
29
 
26
- ## Account Management
30
+ If you migrate existing application from Appcenter to Revopush you should have access to [Appcenter](https://appcenter.ms/)
31
+ to use their UI and CLI.
27
32
 
28
- Before you can begin releasing app updates, you need to create a CodePush account. You can do this by simply running the following command once you've installed the CLI:
33
+ ### 2.1 Appcenter Command Line Interface
34
+ You manage most of CodePush's functionality using the App Center CLI.
35
+ If you had one installed, you can update it to the latest version by running the following command:
29
36
 
37
+ ```shell
38
+ npm update -g appcenter
30
39
  ```
31
- code-push-standalone register <optional: server-url>
32
- ```
33
-
34
- This will launch a browser, asking you to authenticate with either your GitHub or Microsoft account. Once authenticated, it will create a CodePush account "linked" to your GitHub/MSA identity, and generate an access key you can copy/paste into the CLI in order to login.
35
-
36
- _Note: After registering, you are automatically logged-in with the CLI, so until you explicitly log out, you don't need to login again from the same machine._
37
-
38
- If you have an existing account, you may also link your account to another identity provider (e.g. Microsoft, GitHub) by running:
39
-
40
- ```
41
- code-push-standalone link
42
- ```
43
-
44
- _Note: In order to link multiple accounts, the email address associated with each provider must match._
45
-
46
- ### Authentication
47
40
 
48
- Most commands within the CodePush CLI require authentication, and therefore, before you can begin managing your account, you need to login using the GitHub or Microsoft account you used when registering. You can do this by running the following command:
41
+ or install it from scratch by running the following command:
49
42
 
50
43
  ```shell
51
- code-push-standalone login <optional: server-url>
44
+ npm install -g appcenter@latest
52
45
  ```
53
46
 
54
- This will launch a browser, asking you to authenticate with either your GitHub or Microsoft account. This will generate an access key that you need to copy/paste into the CLI (it will prompt you for it). You are now successfully authenticated and can safely close your browser window.
55
-
56
- If at any time you want to determine if you're already logged in, you can run the following command to display the e-mail address associated with your current authentication session, which identity providers your account is linked to (e.g. GitHub):
47
+ Upon installation or update, you can check the version of the App Center CLI by running the following command:
57
48
 
58
49
  ```shell
59
- code-push-standalone whoami
50
+ appcenter -h
60
51
  ```
61
52
 
62
- When you login from the CLI, your access key is persisted to disk for the duration of your session so that you don't have to login every time you attempt to access your account. In order to end your session and delete this access key, simply run the following command:
53
+ which will display the version of the App Center CLI you have installed with available commands.
63
54
 
64
55
  ```shell
65
- code-push-standalone logout
66
- ```
56
+ $ appcenter -h
67
57
 
68
- If you forget to logout from a machine you'd prefer not to leave a running session on (e.g. your friend's laptop), you can use the following commands to list and remove any current login sessions.
58
+ Visual Studio App Center helps you build, test, distribute, and monitor mobile apps.
59
+ Version 3.0.3
69
60
 
70
- ```shell
71
- code-push-standalone session ls
72
- code-push-standalone session rm <machineName>
61
+ Usage: appcenter <command>
62
+
63
+ Commands:
64
+ analytics View events, audience info, sessions, and other analytics for apps
65
+ apps View and manage apps
66
+ build Start builds, get their status, and download artifacts
67
+ codepush View and manage CodePush deployments and releases
68
+ crashes Upload symbols for better crash reports
69
+ distribute Send builds to testers and manage distribution groups
70
+ orgs Manage organizations
71
+ profile Manage your profile
72
+ telemetry Manage telemetry preferences
73
+ test Start test runs and get their status
74
+ tokens Manage API tokens
75
+ help Get help using appcenter commands
76
+ login Log in
77
+ logout Log out
78
+ setup-autocomplete Setup tab completion for your shell
73
79
  ```
74
80
 
75
- ### Access Keys
81
+ ### 2.2 Revopush Command Line Interface
82
+ Similarly to Appcenter Revopush manages the most of CodePush's functionality using CLI.
76
83
 
77
- If you need to be able to authenticate against the CodePush service without launching a browser and/or without needing to use your GitHub and/or Microsoft credentials (e.g. in a CI environment), you can run the following command to create an "access key" (along with a name describing what it is for):
84
+ To install it run the following command:
78
85
 
79
86
  ```shell
80
- code-push-standalone access-key add "VSTS Integration"
87
+ npm install -g @revopush/code-push-cli
81
88
  ```
82
89
 
83
- By default, access keys expire in 60 days. You can specify a different expiry duration by using the `--ttl` option and passing in a [human readable duration string](https://github.com/jkroso/parse-duration#parsestr) (e.g. "2d" => 2 days, "1h 15 min" => 1 hour and 15 minutes). For security, the key will only be shown once on creation, so remember to save it somewhere if needed!
84
-
85
- After creating the new key, you can specify its value using the `--accessKey` flag of the `login` command, which allows you to perform "headless" authentication, as opposed to launching a browser.
90
+ We also suggest you to periodically update the CLI to the latest version by running the following command:
86
91
 
87
92
  ```shell
88
- code-push-standalone login --accessKey <accessKey>
93
+ npm update -g @revopush/code-push-cli
89
94
  ```
90
95
 
91
- When logging in via this method, the access key will not be automatically invalidated on logout, and can be used in future sessions until it is explicitly removed from the CodePush server or expires. However, it is still recommended that you log out once your session is complete, in order to remove your credentials from disk.
92
-
93
- Finally, if at any point you need to change a key's name and/or expiration date, you can use the following command:
96
+ Upon installation or update, you can check the version of the Revopush CLI and the list of available commands by running the following command:
94
97
 
95
98
  ```shell
96
- code-push-standalone access-key patch <accessKeyName> --name "new name" --ttl 10d
99
+ revopush -h
97
100
  ```
98
101
 
99
- _NOTE: When patching the TTL of an existing access key, its expiration date will be set relative to the current time, with no regard for its previous value._
102
+ which will display the version of the Revopush CLI you have installed with available commands.
100
103
 
101
- ## App Management
104
+ ```shell
105
+ revopush -h
106
+ ____ ____ _
107
+ | _ \ _____ _____ | _ \ _ _ ___| |__
108
+ | |_) / _ \ \ / / _ \| |_) | | | / __| '_ \
109
+ | _ < __/\ V / (_) | __/| |_| \__ \ | | |
110
+ |_| \_\___| \_/ \___/|_| \__,_|___/_| |_| CLI v0.0.1
111
+ ============================================
112
+ Revopush is a service that enables you to deploy mobile app updates directly to your users devices. Visit our website https://revopush.org/
102
113
 
103
- Before you can deploy any updates, you need to register an app with the CodePush service using the following command:
114
+ Usage: revopush <command>
104
115
 
105
- ```
106
- code-push-standalone app add <appName>
107
- ```
116
+ Commands:
117
+ revopush access-key View and manage the access keys associated with your account
118
+ revopush app View and manage your CodePush apps
119
+ revopush collaborator View and manage app collaborators
120
+ revopush debug View the CodePush debug logs for a running app
121
+ revopush deployment View and manage your app deployments
122
+ revopush login Authenticate with the CodePush server in order to begin managing your apps
123
+ revopush logout Log out of the current session
124
+ revopush patch Update the metadata for an existing release
125
+ revopush promote Promote the latest release from one app deployment to another
126
+ revopush register Register a new CodePush account
127
+ revopush release Release an update to an app deployment
128
+ revopush release-react Release a React Native update to an app deployment
129
+ revopush rollback Rollback the latest release for an app deployment
130
+ revopush session View and manage the current login sessions associated with your account
131
+ revopush whoami Display the account info for the current login session
108
132
 
109
- If your app targets both iOS and Android, please _create separate apps for each platform_ with CodePush (see the note below for details). This way, you can manage and release updates to them separately, which in the long run, also tends to make things simpler. The naming convention that most folks use is to suffix the app name with `-iOS` and `-Android`. For example:
133
+ Options:
134
+ --help Show help [boolean]
135
+ -v, --version Show version number [boolean]
110
136
 
111
- ```
112
- code-push-standalone app add MyApp-Android
113
- code-push-standalone app add MyApp-iOS
114
137
  ```
115
138
 
116
- _NOTE: Using the same app for iOS and Android may cause installation exceptions because the CodePush update package produced for iOS will have different content from the update produced for Android._
139
+ ## 3. Appcenter to Revopush migration
117
140
 
118
- All new apps automatically come with two deployments (`Staging` and `Production`) so that you can begin distributing updates to multiple channels without needing to do anything extra (see deployment instructions below). After you create an app, the CLI will output the deployment keys for the `Staging` and `Production` deployments, which you can begin using to configure your mobile clients with the [React Native](http://github.com/Microsoft/react-native-code-push) SDK.
141
+ You need to execute steps in this section if you have been using Appcenter for OTA updates and wish to migrate to Revopush.
119
142
 
120
- If you decide that you don't like the name you gave to an app, you can rename it at any time using the following command:
143
+ If you did not use Appcenter OTA updates before and just wish to apply
144
+ OTA on top of Revopush for your app feel free to skip this section and go to section 4.
121
145
 
122
- ```
123
- code-push-standalone app rename <appName> <newAppName>
124
- ```
125
-
126
- The app's name is only meant to be recognizable from the management side, and therefore, you can feel free to rename it as necessary. It won't actually impact the running app, since update queries are made via deployment keys.
146
+ ### 3.1 Login to Appcenter and Revopush CLI
127
147
 
128
- If at some point you no longer need an app, you can remove it from the server using the following command:
148
+ Execute the following command to login to Appcenter CLI using provider of your choice (GitHub, Facebook, Microsoft, Google):
129
149
 
150
+ ```shell
151
+ appcenter login
130
152
  ```
131
- code-push-standalone app rm <appName>
132
- ```
133
-
134
- Do this with caution since any apps that have been configured to use it will obviously stop receiving updates.
135
153
 
136
- Finally, if you want to list all apps that you've registered with the CodePush server,
137
- you can run the following command:
154
+ Similarly, in a separate window login to Revopush CLI using the following command:
138
155
 
139
- ```
140
- code-push-standalone app ls
156
+ ```shell
157
+ revopush login
141
158
  ```
142
159
 
143
- ### App Collaboration
144
-
145
- If you will be working with other developers on the same CodePush app, you can add them as collaborators using the following command:
160
+ ### 3.2 Define the list of application to migrate
161
+ After login you can check the list of apps you have access to by running the following command:
146
162
 
147
163
  ```shell
148
- code-push-standalone collaborator add <appName> <collaboratorEmail>
164
+ appcenter apps list
149
165
  ```
150
166
 
151
- _NOTE: This expects the developer to have already [registered](#account-creation) with CodePush using the specified e-mail address, so ensure that they have done that before attempting to share the app with them._
152
-
153
- Once added, all collaborators will immediately have the following permissions with regards to the newly shared app:
167
+ Which will display something like this:
154
168
 
155
- 1. View the app, its collaborators, [deployments](#deployment-management) and [release history](#viewing-release-history)
156
- 1. [Release](#releasing-updates) updates to any of the app's deployments
157
- 1. [Promote](#promoting-updates) an update between any of the app's deployments
158
- 1. [Rollback](#rolling-back-undesired-updates) any of the app's deployments
159
- 1. [Patch](#updating-existing-releases) any releases within any of the app's deployments
169
+ ```shell
170
+ johndoe/rn2_android
171
+ johndoe/rn2_ios
172
+ ```
160
173
 
161
- Inversely, that means that an app collaborator cannot do any of the following:
174
+ For given guide we assume that `johndoe/rn2_android` is the React Native application for Android and `johndoe/rn2_ios`
175
+ is the React Native application for iOS.
162
176
 
163
- 1. Rename or delete the app
164
- 1. Transfer ownership of the app
165
- 1. Create, rename or delete new deployments within the app
166
- 1. Clear a deployment's release history
167
- 1. Add or remove collaborators from the app (\*)
177
+ You can check target OS of the app using command `appcenter apps show -a <app name here>`.
168
178
 
169
- _NOTE: A developer can remove him/herself as a collaborator from an app that was shared with them._
179
+ Android:
170
180
 
171
- Over time, if someone is no longer working on an app with you, you can remove them as a collaborator using the following command:
181
+ ```shell
182
+ appcenter apps show -a johndoe/rn2_android
183
+ App Secret: 6c3cb412-105f-422f-b795-af53d0b36a5f
184
+ Description:
185
+ Display Name: rn2_android
186
+ Name: rn2_android
187
+ OS: Android
188
+ Platform: React-Native
189
+ Release Type: Alpha
190
+ Owner ID: a1265e53-0599-4340-8003-7c40f0caff38
191
+ Owner Display Name: John Doe
192
+ Owner Email: johndoe@joghdoe.com
193
+ Owner Name: johndoe
194
+ Azure Subscription ID:
195
+ ```
196
+
197
+ iOS:
172
198
 
173
199
  ```shell
174
- code-push-standalone collaborator rm <appName> <collaboratorEmail>
200
+ appcenter apps show -a johndoe/rn2_ios
201
+ App Secret: 37d1dce7-a991-4ccc-8a0c-1ff8ed00f45d
202
+ Description:
203
+ Display Name: rn2_ios
204
+ Name: rn2_ios
205
+ OS: iOS
206
+ Platform: React-Native
207
+ Release Type:
208
+ Owner ID: a2265e53-0699-4340-8003-7c41f0caff39
209
+ Owner Display Name: John Doe
210
+ Owner Email: johndoe@johndoe.com
211
+ Owner Name: johndoe
212
+ Azure Subscription ID:
213
+ ```
214
+
215
+ ### 3.2 Create applications in Revopush
216
+
217
+ Now you have to create applications in Revopush for each of the applications you have in Appcenter.
218
+ Please keep in mind, compare to Appcenter, Revopush does not accept username (`<username>/<app name>`) as an application name,
219
+ you just need to take part after `<username>` in the Appcenter app name. For example:
220
+
221
+ `johndoe/rn2_ios` becomes `rn2_ios`,
222
+ `johndoe/rn2_android` becomes `rn2_android`.
223
+
224
+ Having these names execute the following command to create applications:
225
+ ```shell
226
+ revopush app add rn2_ios
175
227
  ```
176
228
 
177
- If at any time you want to list all collaborators that have been added to an app, you can simply run the following command:
178
-
229
+ with response like
179
230
  ```shell
180
- code-push-standalone collaborator ls <appName>
231
+ Successfully added the "rn2_ios" app, along with the following default deployments:
232
+ ┌────────────┬────────────────────────────────────────┐
233
+ │ Name │ Deployment Key │
234
+ ├────────────┼────────────────────────────────────────┤
235
+ │ Production │ Z7v_81HyATiWlqZjvQFyu9GIicXAVJHvdy5W-g │
236
+ ├────────────┼────────────────────────────────────────┤
237
+ │ Staging │ PjAEsKZUdAytb5Rq3Kb6yHVfn-H3VJHvdy5W-g │
238
+ └────────────┴────────────────────────────────────────┘
181
239
  ```
182
240
 
183
- Finally, if at some point, you (as the app owner) will no longer be working on the app, and you want to transfer it to another developer (or a client), you can run the following command:
184
-
241
+ and another one for Android:
185
242
  ```shell
186
- code-push-standalone app transfer <appName> <newOwnerEmail>
243
+ revopush app add rn2_android
187
244
  ```
188
245
 
189
- _NOTE: Just like with the `code-push-standalone collaborator add` command, this expects that the new owner has already registered with CodePush using the specified e-mail address._
246
+ with response like
247
+ ```shell
248
+ Successfully added the "rn2_android" app, along with the following default deployments:
249
+ ┌────────────┬────────────────────────────────────────┐
250
+ │ Name │ Deployment Key │
251
+ ├────────────┼────────────────────────────────────────┤
252
+ │ Production │ EVGdS0GR4Sus584cdyZ95wmwI405VJHvdy5W-g │
253
+ ├────────────┼────────────────────────────────────────┤
254
+ │ Staging │ pkCafa80S-ji3y6Xey6zVcEju9AHVJHvdy5W-g │
255
+ └────────────┴────────────────────────────────────────┘
256
+ ```
190
257
 
191
- Once confirmed, the specified developer becomes the app's owner and immediately receives the permissions associated with that role. Besides the transfer of ownership, nothing else about the app is modified (e.g. deployments, release history, collaborators). This means that you will still be a collaborator of the app, and therefore, if you want to remove yourself, you simply need to run the `code-push-standalone collaborator rm` command after successfully transferring ownership.
258
+ Out of the box, Revopush will also create two deployments (Staging and Production) for the application you have created.
259
+ It empowers you to use the best practices of [Multi-Deployment Testing](https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-deployment).
260
+ You can add more deployments later or delete if you need to. However, you do not have to remember or save these deployments keys,
261
+ because you can always take them using Revopush CLI.
192
262
 
193
- ### Deployment Management
263
+ ### 3.2 Replicate Appcenter Deployments in Revopush
194
264
 
195
- From the CodePush perspective, an app is simply a named grouping for one or more things called "deployments". While the app represents a conceptual "namespace" or "scope" for a platform-specific version of an app (e.g. the iOS port of Foo app), its deployments represent the actual target for releasing updates (for developers) and synchronizing updates (for end-users). Deployments allow you to have multiple "environments" for each app in-flight at any given time, and help model the reality that apps typically move from a dev's personal environment to a testing/QA/staging environment, before finally making their way into production.
265
+ Revopush allows you to create multiple deployments for each application with the same deployment keys as you have in Appcenter.
266
+ The reason for that is that these keys are treated as a sort of secrets (for instance these can be used in your CI/CD pipeline,
267
+ environment variables on developer machine or build server, mobile app, etc).
268
+ To reduce frictions in migration process and make the process as smooth as possible
269
+ we recommend you to reuse these keys in Revopush deployments.
196
270
 
197
- _NOTE: As you'll see below, the `release`, `promote` and `rollback` commands require both an app name and a deployment name is order to work, because it is the combination of the two that uniquely identifies a point of distribution (e.g. I want to release an update of my iOS app to my beta testers)._
271
+ In examples below we assume you have 2 deployments in Appcenter for every app: `Staging` and `Production`.
272
+ Actual number of deployments can be different in your case but idea is the same - re-create these with identical keys in Revopush.
198
273
 
199
- Whenever an app is registered with the CodePush service, it includes two deployments by default: `Staging` and `Production`. This allows you to immediately begin releasing updates to an internal environment, where you can thoroughly test each update before pushing them out to your end-users. This workflow is critical for ensuring your releases are ready for mass-consumption, and is a practice that has been established in the web for a long time.
274
+ Run the following command:
200
275
 
201
- If having a staging and production version of your app is enough to meet your needs, then you don't need to do anything else. However, if you want an alpha, dev, etc. deployment, you can easily create them using the following command:
276
+ #### iOS
202
277
 
278
+ ```shell
279
+ appcenter codepush deployment list -k -a johndoe/rn2_ios
203
280
  ```
204
- code-push-standalone deployment add <appName> <deploymentName>
205
- ```
206
-
207
- Just like with apps, you can remove and rename deployments as well, using the following commands respectively:
208
281
 
282
+ which will display something like this:
283
+ ```shell
284
+ ┌────────────┬────────────────────────────────────────┐
285
+ │ Name │ Key │
286
+ ├────────────┼────────────────────────────────────────┤
287
+ │ Production │ xJeOl4A5No7c9-wJv8HLj1ktmmKeP5awD0us5u │
288
+ ├────────────┼────────────────────────────────────────┤
289
+ │ Staging │ ZFZiSAKLUL_QmBXeWAcSkpv87fkaDeWu1W0TOs │
290
+ └────────────┴────────────────────────────────────────┘
209
291
  ```
210
- code-push-standalone deployment rm <appName> <deploymentName>
211
- code-push-standalone deployment rename <appName> <deploymentName> <newDeploymentName>
212
- ```
213
-
214
- If at any time you'd like to view the list of deployments that a specific app includes, you can simply run the following command:
215
292
 
293
+ Add Revopush deployment for iOS with the same keys running command to replicate Staging
294
+ ```shell
295
+ revopush deployment add rn2_ios appcenter_Staging -k ZFZiSAKLUL_QmBXeWAcSkpv87fkaDeWu1W0TOs
216
296
  ```
217
- code-push-standalone deployment ls <appName> [--displayKeys|-k]
218
- ```
219
-
220
- This will display not only the list of deployments, but also the update metadata (e.g. mandatory, description) and installation metrics for their latest release:
221
-
222
- ![Deployment list](https://cloud.githubusercontent.com/assets/116461/12526883/7730991c-c127-11e5-9196-98e9ceec758f.png)
223
-
224
- _NOTE: Due to their infrequent use and needed screen real estate, deployment keys aren't displayed by default. If you need to view them, simply make sure to pass the `-k` flag to the `deployment ls` command._
225
-
226
- The install metrics have the following meaning:
227
-
228
- - **Active** - The number of successful installs that are currently running this release (i.e. if the user opened your app, they would see/run this version). This number will increase and decrease as end-users upgrade to and away from this release, respectively. This metric shows both the total of active users, as well as what percentage of your overall audience that represents. This makes it easy to determine the distribution of updates that your users are currently running, as well as answer questions such as "How many of my users have received my latest update?".
229
297
 
230
- - **Total** - The total number of successful installations that this update has received overall. This number only ever increases as new users/devices install it, and therefore, this is always a superset of the total active count. An update is considered successful once `notifyApplicationReady` (or `sync`) is called after it was installed. Between the moment that an update is downloaded, and it is marked as being successful, it will be reported as a "pending" update (see below for details).
231
-
232
- - **Pending** - The number of times this release has been downloaded, but not yet installed (i.e. the app was restarted to apply the changes). Therefore, this metric increases as updates are downloaded, and decreases as those corresponding downloaded updates are installed. This metric primarily applies to updates that aren't configured to install immediately, and helps provide the broader picture of release adoption for apps that rely on app resume and/or restart to apply an update (e.g. I want to rollback an update and I'm curious if anyone has downloaded it yet). If you've configured updates to install immediately, and are still seeing pending updates being reported, then it's likely that you're not calling `notifyApplicationReady` (or `sync`) on app start, which is the method that initiates sending install reports and marks installed updates as being considered successful.
233
-
234
- - **Rollbacks** - The number of times that this release has been automatically rolled back on the client. Ideally this number should be zero, and in that case, this metric isn't even shown. However, if you released an update that includes a crash as part of the installation process, the CodePush plugin will roll the end-user back to the previous release, and report that issue back to the server. This allows your end-users to remain unblocked in the event of broken releases, and by being able to see this telemetry in the CLI, you can identify erroneous releases and respond to them by [rolling it back](#rolling-back-undesired-updates) on the server.
235
-
236
- - **Rollout** - Indicates the percentage of users that are eligible to receive this update. This property will only be displayed for releases that represent an "active" rollout, and therefore, have a rollout percentage that is less than 100%. Additionally, since a deployment can only have one active rollout at any given time, this label would only be present on the latest release within a deployment.
237
-
238
- - **Disabled** - Indicates whether the release has been marked as disabled or not, and therefore, is downloadable by end users. This property will only be displayed for releases that are actually disabled.
239
-
240
- When the metrics cell reports `No installs recorded`, that indicates that the server hasn't seen any activity for this release. This could either be because it precluded the plugin versions that included telemetry support, or no end-users have synchronized with the CodePush server yet. As soon as an install happens, you will begin to see metrics populate in the CLI for the release.
241
-
242
- ## Releasing Updates
243
-
244
- Once your app has been configured to query for updates against the CodePush server, you can begin releasing updates to it. In order to provide both simplicity and flexibility, the CodePush CLI includes two different commands for releasing updates:
245
-
246
- 1. [General](#releasing-updates-general) - Releases an update to the CodePush server that was generated by an external tool or build script (e.g. a Gulp task, the `react-native bundle` command). This provides the most flexibility in terms of fitting into existing workflows, since it strictly deals with CodePush-specific step, and leaves the app-specific compilation process to you.
247
-
248
- 2. [React Native](#releasing-updates-react-native) - Performs the same functionality as the general release command, but also handles the task of generating the updated app contents for you (JS bundle and assets), instead of requiring you to run both `react-native bundle` and then `code-push-standalone release`.
249
-
250
- Which of these commands you should use is mostly a matter of requirements and/or preference. However, we generally recommend using the platform-specific command to start (since it greatly simplifies the experience), and then leverage the general-purpose `release` command if/when greater control is needed.
251
-
252
- ### Releasing Updates (General)
253
-
254
- ```
255
- code-push-standalone release <appName> <updateContents> <targetBinaryVersion>
256
- [--deploymentName <deploymentName>]
257
- [--description <description>]
258
- [--disabled <disabled>]
259
- [--mandatory]
260
- [--noDuplicateReleaseError]
261
- [--rollout <rolloutPercentage>]
298
+ and the following command to replicate Production
299
+ ```shell
300
+ revopush deployment add rn2_ios appcenter_Production -k xJeOl4A5No7c9-wJv8HLj1ktmmKeP5awD0us5u
262
301
  ```
263
302
 
264
- #### App name parameter
265
-
266
- This specifies the name of the CodePush app that this update is being released for. This value corresponds to the friendly name that you specified when originally calling `code-push-standalone app add` (e.g. "MyApp-Android"). If you need to look it up, you can run the `code-push-standalone app ls` command to see your list of apps.
267
-
268
- #### Update contents parameter
269
-
270
- This specifies the location of the updated app code and assets you want to release. You can provide either a single file (e.g. a JS bundle for a React Native app), or a path to a directory. Note that you don't need to ZIP up multiple files or directories in order to deploy those changes, since the CLI will automatically ZIP them for you.
271
-
272
- It's important that the path you specify refers to the platform-specific, prepared/bundled version of your app. The following table outlines which command you should run before releasing, as well as the location you can subsequently refer to using the `updateContents` parameter:
273
-
274
- | Platform | Prepare command | Package path (relative to project root) |
275
- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
276
- | React Native wo/assets (Android) | `react-native bundle --platform android --entry-file <entryFile> --bundle-output <bundleOutput> --dev false` | Value of the `--bundle-output` option |
277
- | React Native w/assets (Android) | `react-native bundle --platform android --entry-file <entryFile> --bundle-output <releaseFolder>/<bundleOutput> --assets-dest <releaseFolder> --dev false` | Value of the `--assets-dest` option, which should represent a newly created directory that includes your assets and JS bundle |
278
- | React Native wo/assets (iOS) | `react-native bundle --platform ios --entry-file <entryFile> --bundle-output <bundleOutput> --dev false` | Value of the `--bundle-output` option |
279
- | React Native w/assets (iOS) | `react-native bundle --platform ios --entry-file <entryFile> --bundle-output <releaseFolder>/<bundleOutput> --assets-dest <releaseFolder> --dev false` | Value of the `--assets-dest` option, which should represent a newly created directory that includes your assets and JS bundle |
280
-
281
- #### Target binary version parameter
282
-
283
- This specifies the store/binary version of the application you are releasing the update for, so that only users running that version will receive the update, while users running an older and/or newer version of the app binary will not. This is useful for the following reasons:
284
-
285
- 1. If a user is running an older binary version, it's possible that there are breaking changes in the CodePush update that wouldn't be compatible with what they're running.
286
-
287
- 2. If a user is running a newer binary version, then it's presumed that what they are running is newer (and potentially incompatible) with the CodePush update.
288
-
289
- If you ever want an update to target multiple versions of the app store binary, we also allow you to specify the parameter as a [semver range expression](https://github.com/npm/node-semver#advanced-range-syntax). That way, any client device running a version of the binary that satisfies the range expression (i.e. `semver.satisfies(version, range)` returns `true`) will get the update. Examples of valid semver range expressions are as follows:
290
-
291
- | Range Expression | Who gets the update |
292
- | ---------------- | -------------------------------------------------------------------------------------- |
293
- | `1.2.3` | Only devices running the specific binary app store version `1.2.3` of your app |
294
- | `*` | Any device configured to consume updates from your CodePush app |
295
- | `1.2.x` | Devices running major version 1, minor version 2 and any patch version of your app |
296
- | `1.2.3 - 1.2.7` | Devices running any binary version between `1.2.3` (inclusive) and `1.2.7` (inclusive) |
297
- | `>=1.2.3 <1.2.7` | Devices running any binary version between `1.2.3` (inclusive) and `1.2.7` (exclusive) |
298
- | `~1.2.3` | Equivalent to `>=1.2.3 <1.3.0` |
299
- | `^1.2.3` | Equivalent to `>=1.2.3 <2.0.0` |
300
-
301
- _NOTE: If your semver expression starts with a special shell character or operator such as `>`, `^`, or \*\*
302
- _, the command may not execute correctly if you do not wrap the value in quotes as the shell will not supply the right values to our CLI process. Therefore, it is best to wrap your `targetBinaryVersion` parameter in double quotes when calling the `release` command, e.g. `code-push-standalone release MyApp-iOS updateContents ">1.2.3"`.\*
303
-
304
- _NOTE: As defined in the semver spec, ranges only work for non pre-release versions: https://github.com/npm/node-semver#prerelease-tags. If you want to update a version with pre-release tags, then you need to write the exact version you want to update (`1.2.3-beta` for example)._
305
-
306
- The following table outlines the version value that CodePush expects your update's semver range to satisfy for each respective app type:
307
-
308
- | Platform | Source of app store version |
309
- | ---------------------- | ---------------------------------------------------------------------------- |
310
- | React Native (Android) | The `android.defaultConfig.versionName` property in your `build.gradle` file |
311
- | React Native (iOS) | The `CFBundleShortVersionString` key in the `Info.plist` file |
312
- | React Native (Windows) | The `<Identity Version>` key in the `Package.appxmanifest` file |
313
-
314
- _NOTE: If the app store version in the metadata files are missing a patch version, e.g. `2.0`, it will be treated as having a patch version of `0`, i.e. `2.0 -> 2.0.0`._
315
-
316
- #### Deployment name parameter
317
-
318
- This specifies which deployment you want to release the update to. This defaults to `Staging`, but when you're ready to deploy to `Production`, or one of your own custom deployments, just explicitly set this argument.
319
-
320
- _NOTE: The parameter can be set using either "--deploymentName" or "-d"._
321
-
322
- #### Description parameter
323
-
324
- This provides an optional "change log" for the deployment. The value is simply round tripped to the client so that when the update is detected, your app can choose to display it to the end-user (e.g. via a "What's new?" dialog). This string accepts control characters such as `\n` and `\t` so that you can include whitespace formatting within your descriptions for improved readability.
325
-
326
- _NOTE: This parameter can be set using either "--description" or "-des"_
327
-
328
- #### Disabled parameter
329
-
330
- This specifies whether an update should be downloadable by end users or not. If left unspecified, the update will not be disabled (i.e. users will download it the moment your app calls `sync`). This parameter can be valuable if you want to release an update that isn't immediately available, until you explicitly [patch it](#patching-releases) when you want end users to be able to download it (e.g. an announcement blog post went live).
331
-
332
- _NOTE: This parameter can be set using either "--disabled" or "-x"_
333
-
334
- #### Mandatory parameter
335
-
336
- This specifies whether the update should be considered mandatory or not (e.g. it includes a critical security fix). This attribute is simply round tripped to the client, who can then decide if and how they would like to enforce it.
337
-
338
- _NOTE: This parameter is simply a "flag", and therefore, its absence indicates that the release is optional, and its presence indicates that it's mandatory. You can provide a value to it (e.g. `--mandatory true`), however, simply specifying `--mandatory` is sufficient for marking a release as mandatory._
339
-
340
- The mandatory attribute is unique because the server will dynamically modify it as necessary in order to ensure that the semantics of your releases are maintained for your end-users. For example, imagine that you released the following three updates to your app:
341
-
342
- | Release | Mandatory? |
343
- | ------- | ---------- |
344
- | v1 | No |
345
- | v2 | Yes |
346
- | v3 | No |
347
-
348
- If an end-user is currently running `v1`, and they query the server for an update, it will respond with `v3` (since that is the latest), but it will dynamically convert the release to mandatory, since a mandatory update was released in between. This behavior is important since the code contained in `v3` is incremental to that included in `v2`, and therefore, whatever made `v2` mandatory, continues to make `v3` mandatory for anyone that didn't already acquire `v2`.
349
-
350
- If an end-user is currently running `v2`, and they query the server for an update, it will respond with `v3`, but leave the release as optional. This is because they already received the mandatory update, and therefore, there isn't a need to modify the policy of `v3`. This behavior is why we say that the server will "dynamically convert" the mandatory flag, because as far as the release goes, its mandatory attribute will always be stored using the value you specified when releasing it. It is only changed on-the-fly as necessary when responding to an update check from an end-user.
351
-
352
- If you never release an update that is marked as mandatory, then the above behavior doesn't apply to you, since the server will never change an optional release to mandatory unless there were intermingled mandatory updates as illustrated above. Additionally, if a release is marked as mandatory, it will never be converted to optional, since that wouldn't make any sense. The server will only change an optional release to mandatory in order to respect the semantics described above.
353
-
354
- _NOTE: This parameter can be set using either `--mandatory` or `-m`_
355
-
356
- #### No duplicate release error parameter
357
-
358
- This specifies that if the update is identical to the latest release on the deployment, the CLI should generate a warning instead of an error. This is useful for continuous integration scenarios where it is expected that small modifications may trigger releases where no production code has changed.
303
+ where:
304
+ - `rn2_ios` is the application name in Revopush
305
+ - `appcenter_Staging` and `appcenter_Production` are the deployment names in Revopush (the same as in Appcenter but for sake of clarity we added `appcenter_` prefix)
306
+ - `ZFZiSAKLUL_QmBXeWAcSkpv87fkaDeWu1W0TOs` is the deployment key for `Staging` in Appcenter
307
+ - `xJeOl4A5No7c9-wJv8HLj1ktmmKeP5awD0us5u` is the deployment key for `Production` in Appcenter
359
308
 
360
- #### Rollout parameter
309
+ Help tip:
310
+ Until you switched your mobile application to use Revopush (more about this below) or during testing it's totally fine to delete the deployment in Revopush.
361
311
 
362
- **IMPORTANT: In order for this parameter to actually take affect, your end users need to be running version `1.9.0-beta+` (for React Native) of the CodePush plugin. If you release an update that specifies a rollout property, no end user running an older version of React Native plugins will be eligible for the update. Therefore, until you have adopted the neccessary version of the platform-specific CodePush plugin (as previously mentioned), we would advise not setting a rollout value on your releases, since no one would end up receiving it.**
312
+ To delete deployment if you need run the following command:
363
313
 
364
- This specifies the percentage of users (as an integer between `1` and `100`) that should be eligible to receive this update. It can be helpful if you want to "flight" new releases with a portion of your audience (e.g. 25%), and get feedback and/or watch for exceptions/crashes, before making it broadly available for everyone. If this parameter isn't set, it is set to `100%`, and therefore, you only need to set it if you want to actually limit how many users will receive it.
365
-
366
- When leveraging the rollout capability, there are a few additional considerations to keep in mind:
367
-
368
- 1. You cannot release a new update to a deployment whose latest release is an "active" rollout (i.e. its rollout property is non-null). The rollout needs to be "completed" (i.e. setting the `rollout` property to `100`) before you can release further updates to the deployment.
369
-
370
- 2. If you rollback a deployment whose latest release is an "active" rollout, the rollout value will be cleared, effectively "deactivating" the rollout behavior
371
-
372
- 3. Unlike the `mandatory` and `description` fields, when you promote a release from one deployment to another, it will not propagate the `rollout` property, and therefore, if you want the new release (in the target deployment) to have a rollout value, you need to explicitly set it when you call the `promote` command.
314
+ ```shell
315
+ revopush deployment rm rn2_ios appcenter_Staging
316
+ ````
373
317
 
374
- _NOTE: This parameter can be set using either `--rollout` or `-r`_
318
+ #### Android
375
319
 
376
- ### Releasing Updates (React Native)
320
+ For Android app steps are very similar except different app name. List deployments in Appcenter:
377
321
 
378
322
  ```shell
379
- code-push-standalone release-react <appName> <platform>
380
- [--bundleName <bundleName>]
381
- [--deploymentName <deploymentName>]
382
- [--description <description>]
383
- [--development <development>]
384
- [--disabled <disabled>]
385
- [--entryFile <entryFile>]
386
- [--gradleFile <gradleFile>]
387
- [--mandatory]
388
- [--noDuplicateReleaseError]
389
- [--outputDir <outputDir>]
390
- [--plistFile <plistFile>]
391
- [--plistFilePrefix <plistFilePrefix>]
392
- [--sourcemapOutput <sourcemapOutput>]
393
- [--targetBinaryVersion <targetBinaryVersion>]
394
- [--rollout <rolloutPercentage>]
395
- [--useHermes <useHermes>]
396
- [--podFile <podFile>]
397
- [--extraHermesFlags <extraHermesFlags>]
398
- [--privateKeyPath <privateKeyPath>]
399
- [--xcodeProjectFile <xcodeProjectFile>]
400
- [--xcodeTargetName <xcodeTargetName>]
401
- [--buildConfigurationName <buildConfigurationName>]
323
+ appcenter codepush deployment list -k -a johndoe/rn2_android
402
324
  ```
403
325
 
404
- The `release-react` command is a React Native-specific version of the "vanilla" [`release`](#releasing-app-updates) command, which supports all of the same parameters (e.g. `--mandatory`, `--description`), yet simplifies the process of releasing updates by performing the following additional behavior:
405
-
406
- 1. Running the `react-native bundle` command in order to generate the [update contents](#update-contents-parameter) (JS bundle and assets) that will be released to the CodePush server. It uses sensible defaults as much as possible (e.g. creating a non-dev build, assuming an iOS entry file is named `index.ios.js`), but also exposes the relevant `react-native bundle` parameters to enable flexibility (e.g. `--sourcemapOutput`).
407
-
408
- 2. Inferring the [`targetBinaryVersion`](#target-binary-version-parameter) of this release by using the version name that is specified in your project's `Info.plist` (for iOS) and `build.gradle` (for Android) files.
409
-
410
- To illustrate the difference that the `release-react` command can make, the following is an example of how you might generate and release an update for a React Native app using the "vanilla" `release` command:
411
-
326
+ with output like this:
412
327
  ```shell
413
- mkdir ./CodePush
414
-
415
- react-native bundle --platform ios \
416
- --entry-file index.ios.js \
417
- --bundle-output ./CodePush/main.jsbundle \
418
- --assets-dest ./CodePush \
419
- --dev false
420
-
421
- code-push-standalone release MyApp-iOS ./CodePush 1.0.0
328
+ ┌────────────┬────────────────────────────────────────┐
329
+ │ Name │ Key │
330
+ ├────────────┼────────────────────────────────────────┤
331
+ Production │ PQPwJaW63MTPI8T__u168qJm7Vq7Mn0UJ94MMR │
332
+ ├────────────┼────────────────────────────────────────┤
333
+ │ Staging │ 4tK3WlLhumcwaukx68Irq04XqS_3R4H6N-lV-z
334
+ └────────────┴────────────────────────────────────────┘
422
335
  ```
423
336
 
424
- Achieving the equivalent behavior with the `release-react` command would simply require the following command, which is generally less error-prone:
425
-
337
+ Add Revopush Android Staging deployment
426
338
  ```shell
427
- code-push-standalone release-react MyApp-iOS ios
339
+ revopush deployment add rn2_android appcenter_Staging -k 4tK3WlLhumcwaukx68Irq04XqS_3R4H6N-lV-z
428
340
  ```
429
341
 
430
- #### App name parameter
431
-
432
- This is the same parameter as the one described in the [above section](#app-name-parameter).
342
+ Add Revopush Android Production deployment
433
343
 
434
- #### Platform parameter
435
-
436
- This specifies which platform the current update is targeting, and can be either `android`, `ios` or `windows` (case-insensitive). This value is only used to determine how to properly bundle your update contents and isn't actually sent to the server.
437
-
438
- #### Deployment name parameter
439
-
440
- This is the same parameter as the one described in the [above section](#deployment-name-parameter).
441
-
442
- #### Description parameter
443
-
444
- This is the same parameter as the one described in the [above section](#description-parameter).
445
-
446
- #### Mandatory parameter
344
+ ```shell
345
+ revopush deployment add rn2_android appcenter_Production -k PQPwJaW63MTPI8T__u168qJm7Vq7Mn0UJ94MMR
346
+ ```
447
347
 
448
- This is the same parameter as the one described in the [above section](#mandatory-parameter).
348
+ where:
349
+ - `rn2_android` is the application name in Revopush
350
+ - `appcenter_Staging` and `appcenter_Production` are the deployment names in Revopush (the same as in Appcenter but for sake of clarity we added `appcenter_` prefix)
351
+ - `4tK3WlLhumcwaukx68Irq04XqS_3R4H6N-lV-z` is the deployment key for `Staging` in Appcenter
352
+ - `PQPwJaW63MTPI8T__u168qJm7Vq7Mn0UJ94MMR` is the deployment key for `Production` in Appcenter
449
353
 
450
- #### No duplicate release error parameter
354
+ Repeat for all other deployment you have in Appcenter and wish to continue to use in Revopush.
451
355
 
452
- This is the same parameter as the one described in the [above section](#no-duplicate-release-error-parameter).
356
+ ## 4. Create Application and Deployments in Revopush
453
357
 
454
- #### Rollout parameter
358
+ You need to execute steps in this section if you start from scratch and wish to apply OTA on top of Revopush for your app.
359
+ People who migrate from Appcenter to Revopush can skip this section (we have done all what we need in previous sections)
360
+ and go to section 5.
455
361
 
456
- This is the same parameter as the one described in the [above section](#rollout-parameter). If left unspecified, the release will be made available to all users.
362
+ It empowers you to use the best practices of [Multi-Deployment Testing](https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-deployment)
363
+ and have isolated app for iOS and Android each with few Deployments (at least `Staging` and `Production`).
457
364
 
458
- #### Target binary version parameter
459
365
 
460
- This is the same parameter as the one described in the [above section](#target-binary-version-parameter). If left unspecified, this defaults to targeting the exact version specified in the app's `Info.plist` (for iOS) and `build.gradle` (for Android) files.
366
+ ### 4.1 Login to Revopush CLI
461
367
 
462
- #### Bundle name parameter
368
+ Execute the following command to login to Revopush CLI using provider of your choice (GitHub, Google):
463
369
 
464
- This specifies the file name that should be used for the generated JS bundle. If left unspecified, the standard bundle name will be used for the specified platform: `main.jsbundle` (iOS), `index.android.bundle` (Android) and `index.windows.bundle` (Windows).
370
+ ```shell
371
+ revopush login
372
+ ```
465
373
 
466
- _NOTE: This parameter can be set using either --bundleName or -b_
374
+ ### 4.2 Create applications in Revopush
467
375
 
468
- #### Development parameter
376
+ Revopush does not specify the target platform of the application at the moment of creation.
377
+ To later easy manage them we suggest to give them meaningful names which will contain platform as a part of it.
469
378
 
470
- This specifies whether to generate a unminified, development JS bundle. If left unspecified, this defaults to `false` where warnings are disabled and the bundle is minified.
379
+ #### iOS
471
380
 
472
- _NOTE: This parameter can be set using either --development or --dev_
381
+ ```shell
382
+ revopush app add myAmazingApp_ios
383
+ ```
473
384
 
474
- #### Disabled parameter
385
+ with response like
475
386
 
476
- This is the same parameter as the one described in the [above section](#disabled-parameter).
387
+ ```shell
388
+ Successfully added the "myAmazingApp_ios" app, along with the following default deployments:
389
+ ┌────────────┬────────────────────────────────────────┐
390
+ │ Name │ Deployment Key │
391
+ ├────────────┼────────────────────────────────────────┤
392
+ │ Production │ PRer2J8xeLerKNZ16Klsf5yfdc8uVJHvdy5W-g │
393
+ ├────────────┼────────────────────────────────────────┤
394
+ │ Staging │ vUOFPtZfOlhXHPEDE3nkf7nP6lJ4VJHvdy5W-g │
395
+ └────────────┴────────────────────────────────────────┘
396
+ ````
397
+
398
+ #### Android
477
399
 
478
- #### Entry file parameter
400
+ ```shell
401
+ revopush app add myAmazingApp_android
402
+ ```
479
403
 
480
- This specifies the relative path to the app's root/entry JavaScript file. If left unspecified, this defaults to `index.ios.js` (for iOS), `index.android.js` (for Android) or `index.windows.bundle` (for Windows) if that file exists, or `index.js` otherwise.
404
+ with response like
405
+ ```shell
406
+ Successfully added the "myAmazingApp_android" app, along with the following default deployments:
407
+ ┌────────────┬────────────────────────────────────────┐
408
+ │ Name │ Deployment Key │
409
+ ├────────────┼────────────────────────────────────────┤
410
+ │ Production │ I0N9-8MCI-JAAmlrbjGRROGFFFvtVJHvdy5W-g │
411
+ ├────────────┼────────────────────────────────────────┤
412
+ │ Staging │ kbAXqSrgEfLPcuvU3Fe0SCqX5HpOVJHvdy5W-g │
413
+ └────────────┴────────────────────────────────────────┘
414
+ ````
481
415
 
482
- _NOTE: This parameter can be set using either --entryFile or -e_
416
+ ### 4.3 Create deployments in Revopush
483
417
 
484
- #### Gradle file parameter (Android only)
418
+ In addition to two deployments we create out of the box you may need to have more for your application (eg for development, testing).
485
419
 
486
- This specifies the relative path to the `build.gradle` file that the CLI should use when attempting to auto-detect the target binary version for the release. This parameter is only meant for advanced scenarios, since the CLI will automatically be able to find your `build.grade` file in "standard" React Native projects. However, if your gradle file is located in an arbitrary location, that the CLI can't discover, then using this parameter allows you to continue releasing CodePush updates, without needing to explicitly set the `--targetBinaryVersion` parameter. Since `build.gradle` is a required file name, specifying the path to the containing folder or the full path to the file itself will both achieve the same effect.
420
+ The following command will create a new deployment for the application you have created:
487
421
 
488
422
  ```shell
489
- code-push-standalone release-react MyApp-Android android -p "./foo/bar/"
490
- code-push-standalone release-react MyApp-Android android -p "./foo/bar/build.gradle"
423
+ revopush deployment add myAmazingApp_android Development
491
424
  ```
492
425
 
493
- #### Plist file parameter (iOS only)
494
-
495
- This specifies the relative path to the `Info.plist` file that the CLI should use when attempting to auto-detect the target binary version for the release. This parameter is only meant for advanced scenarios, since the CLI will automatically be able to find your `Info.plist` file in "standard" React Native projects, and you can use the `--plistFilePrefix` parameter in order to support per-environment plist files (e.g. `STAGING-Info.plist`). However, if your plist is located in an arbitrary location, that the CLI can't discover, then using this parameter allows you to continue releasing CodePush updates, without needing to explicitly set the `--targetBinaryVersion` parameter.
496
-
426
+ with response like
497
427
  ```shell
498
- code-push-standalone release-react MyApp-iOS ios -p "./foo/bar/MyFile.plist"
428
+ Successfully added the "Development" deployment with key "7Eh9BWf9FIr4_d33ay_oj4zeVoYqVJHvdy5W-g" to the "myAmazingApp_android" app.
499
429
  ```
500
430
 
501
- _NOTE: This parameter can be set using either --plistFile or -p_
502
-
503
- #### Plist file prefix parameter (iOS only)
504
-
505
- This specifies the file name prefix of the `Info.plist` file that that CLI should use when attempting to auto-detect the target binary version for the release. This can be useful if you've created per-environment plist files (e.g. `DEV-Info.plist`, `STAGING-Info.plist`), and you want to be able to release CodePush updates without needing to explicitly set the `--targetBinaryVersion` parameter. By specifying a `--plistFilePrefx`, the CLI will look for a file named `<prefix>-Info.plist`, instead of simply `Info.plist` (which is the default behavior), in the following locations: `./ios` and `./ios/<appName>`. If your plist file isn't located in either of those directories (e.g. your app is a native iOS app with embedded RN views), or uses an entirely different file naming convention, then consider using the `--plistFile` parameter.
431
+ To list all the deployments with their keys for the application run the following command:
506
432
 
507
433
  ```shell
508
- # Auto-detect the target binary version of this release by looking up the
509
- # app version within the STAGING-Info.plist file in either the ./ios or ./ios/<APP> directories.
510
- code-push-standalone release-react MyApp-iOS ios --pre "STAGING"
511
-
512
- # Tell the CLI to use your dev plist (`DEV-Info.plist`).
513
- # Note that the hyphen separator can be explicitly stated.
514
- code-push-standalone release-react MyApp-iOS ios --pre "DEV-"
434
+ revopush deployment ls myAmazingApp_android -k
515
435
  ```
516
436
 
517
- _NOTE: This parameter can be set using either --plistFilePrefix or --pre_
518
-
519
- #### Sourcemap output parameter
520
-
521
- This specifies the relative path to where the generated JS bundle's sourcemap file should be written. If left unspecified, sourcemaps will not be generated.
522
-
523
- _NOTE: This parameter can be set using either --sourcemapOutput or -s_
524
-
525
- #### Output directory parameter
526
-
527
- This specifies the relative path to where the assets, JS bundle and sourcemap files should be written. If left unspecified, the assets, JS bundle and sourcemap will be copied to the `/tmp/CodePush` folder.
528
-
529
- _NOTE: This parameter can be set using either --outputDir or -o_
530
-
531
- #### Use Hermes parameter
532
-
533
- This parameter enforces the use of the Hermes compiler. If not specified, the automatic checks will be performed, inspecting the `build.gradle` and `Podfile` for the Hermes flag.
534
-
535
- _NOTE: This parameter can be set using either --hermesEnabled or -h_
536
-
537
- #### Podfile parameter (iOS only)
538
-
539
- The Podfile path will be used for Hermes automatic check. Not used if `--useHermes` is specified.
540
-
541
- _NOTE: This parameter can be set using either --podfile or -pod_
542
-
543
- #### Extra hermes flags parameter
544
-
545
- Hermes flags which will be passed to Hermes compiler.
546
-
547
- _NOTE: This parameter can be set using either --extraHermesFlags or -hf_
548
-
549
- #### Private key path parameter
437
+ which will display something like this:
550
438
 
551
- Private key path which is used for code signing.
552
-
553
- _NOTE: This parameter can be set using either --privateKeyPath or -k_
554
-
555
- #### Xcode project file parameter
556
-
557
- Path to the Xcode project or project.pbxproj file.
558
-
559
- _NOTE: This parameter can be set using either --xcodeProjectFile or -xp_
560
-
561
- #### Xcode target name parameter
562
-
563
- Name of target (PBXNativeTarget) which specifies the binary version you want to target this release at (iOS only).
564
-
565
- _NOTE: This parameter can be set using either --xcodeTargetName or -xt_
439
+ ```shell
440
+ ┌─────────────┬────────────────────────────────────────┬─────────────────────┬──────────────────────┐
441
+ Name │ Deployment Key │ Update Metadata │ Install Metrics │
442
+ ├─────────────┼────────────────────────────────────────┼─────────────────────┼──────────────────────┤
443
+ Development 7Eh9BWf9FIr4_d33ay_oj4zeVoYqVJHvdy5W-g │ No updates released │ No installs recorded │
444
+ ├─────────────┼────────────────────────────────────────┼─────────────────────┼──────────────────────┤
445
+ Production │ D32ZXaQ-JybAzpLIiwZaNqh2XgLRVJHvdy5W-g No updates released │ No installs recorded │
446
+ ├─────────────┼────────────────────────────────────────┼─────────────────────┼──────────────────────┤
447
+ Staging │ siXHHg5Pq1eFzFBdHKSMl23dqdxpVJHvdy5W-g No updates released No installs recorded │
448
+ └─────────────┴────────────────────────────────────────┴─────────────────────┴──────────────────────┘
449
+ ```
566
450
 
567
- #### Build configuration name parameter
451
+ ## 5. Migrate your React Native application to Revopush OTA
568
452
 
569
- Name of build configuration which specifies the binary version you want to target this release at. For example, 'Debug' or 'Release' (iOS only).
453
+ The way how check for updates happens (eg on every app start, or fine-grained control involving user)
454
+ as well as when bundle is installed (eg immediately, on next restart or on next resume) heavy depends on
455
+ your application requirements and used version of React Native and CodePush plugin.
570
456
 
571
- _NOTE: This parameter can be set using either --buildConfigurationName or -c_
457
+ Please refer to official documentation of [react-native-code-push](https://github.com/microsoft/react-native-code-push/tree/master?tab=readme-ov-file#plugin-usage)
458
+ plugin to find an approach which will fit your needs.
572
459
 
573
- ## Debugging CodePush Integration
460
+ At this point we assume you have already applied CodePush plugin on React side and completed setup of native modules
461
+ ( [iOS](https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-ios.md),
462
+ [Android](https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md))
574
463
 
575
- Once you've released an update, React Native plugin has been integrated into your app, it can be helpful to diagnose how the plugin is behaving, especially if you run into an issue and want to understand why. In order to debug the CodePush update discovery experience, you can run the following command in order to easily view the diagnostic logs produced by the CodePush plugin within your app:
464
+ Below are steps to be done for iOS and Android to switch CodePush server location from Appcenter to Revopush.
576
465
 
577
- ```shell
578
- code-push-standalone debug <platform>
466
+ ### 5.1 Update CodePush server URL for iOS
579
467
 
580
- # View all CodePush logs from a running
581
- # instace of the iOS simulator.
582
- code-push-standalone debug ios
468
+ Open your app's `Info.plist` file and add a new entry named `CodePushServerURL` whose value is the URL of the Revopush API server.
583
469
 
584
- # View all CodePush logs from a running
585
- # Android emulator or attached device.
586
- code-push-standalone debug android
470
+ ```xml
471
+ <key>CodePushServerURL</key>
472
+ <string>https://api.revopush.org</string>
587
473
  ```
588
474
 
589
- <img width="500" src="https://cloud.githubusercontent.com/assets/116461/16246597/bd49a9ac-37ba-11e6-9aa4-a2d3b2821a90.png" />
475
+ Also be sure you do have an entry named `CodePushDeploymentKey` whose value is the key of the deployment you want to configure this app against
476
+ (see section above how to get Deployment Key ).
590
477
 
591
- Under the covers, this command simply automates the usage of the iOS system logs and ADB logcat, but provides a platform-agnostic, filtered view of all logs coming from the CodePush plugin. This way, you don't need to learn and/or use another tool simply to be able to answer basic questions about how CodePush is behaving.
592
-
593
- _NOTE: The debug command supports both emulators and devices for Android, but currently only supports listening to logs from the iOS simulator. We hope to add device support soon._
594
-
595
- ## Patching Update Metadata
478
+ ```xml
479
+ <key>CodePushDeploymentKey</key>
480
+ <string>vUOFPtZfOlhXHPEDE3nkf7nP6lJ4VJHvdy5W-g</string>
481
+ ```
596
482
 
597
- After releasing an update, there may be scenarios where you need to modify one or more of the metadata attributes associated with it (e.g. you forgot to mark a critical bug fix as mandatory, you want to increase the rollout percentage of an update). You can easily do this by running the following command:
483
+ As result for our `myAmazingApp_ios` app and `Staging` deployment `Info.plist` section related to CodePush will look like this:
598
484
 
599
- ```shell
600
- code-push-standalone patch <appName> <deploymentName>
601
- [--label <releaseLabel>]
602
- [--mandatory <isMandatory>]
603
- [--description <description>]
604
- [--rollout <rolloutPercentage>]
605
- [--disabled <isDisabled>]
606
- [--targetBinaryVersion <targetBinaryVersion>]
485
+ ```xml
486
+ <key>CodePushDeploymentKey</key>
487
+ <string>vUOFPtZfOlhXHPEDE3nkf7nP6lJ4VJHvdy5W-g</string>
488
+ <key>CodePushServerURL</key>
489
+ <string>https://api.revopush.org</string>
607
490
  ```
608
491
 
609
- _NOTE: This command doesn't allow modifying the actual update contents of a release. If you need to respond to a release that has been identified as being broken, you should use the [rollback](#rolling-back-updates) command to immediately roll it back, and then if necessary, release a new update with the approrpriate fix when it is available._
492
+ _Note: If you need to dynamically use a different deployment, you can also override your deployment key in JS code using
493
+ [Code-Push options](https://github.com/microsoft/react-native-code-push/blob/master/docs/api-js.md#CodePushOptions)_
610
494
 
611
- Aside from the `appName` and `deploymentName`, all parameters are optional, and therefore, you can use this command to update just a single attribute or all of them at once. Calling the `patch` command without specifying any attribute flag will result in a no-op.
495
+ ### 5.2 Update CodePush server URL for Android
612
496
 
613
- ```shell
614
- # Mark the latest production release as mandatory
615
- code-push-standalone patch MyApp-iOS Production -m
497
+ Open your app's `strings.xml` file and add a new entry named `CodePushServerUrl` whose value is the URL of the Revopush API server.
616
498
 
617
- # Increase the rollout for v23 to 50%
618
- code-push-standalone patch MyApp-iOS Production -l v23 -rollout 50%
499
+ ```xml
500
+ <string moduleConfig="true" name="CodePushServerUrl">https://api.revopush.org</string>
619
501
  ```
620
502
 
621
- ### Label parameter
622
-
623
- Indicates which release (e.g. `v23`) you want to update within the specified deployment. If ommitted, the requested changes will be applied to the latest release in the specified deployment. In order to look up the label for the release you want to update, you can run the `code-push-standalone deployment history` command and refer to the `Label` column.
503
+ Also be sure you do have an entry named `CodePushDeploymentKey` whose value is the key of the deployment you want to configure this app against
504
+ (see section above how to get Deployment Key ).
624
505
 
625
- _NOTE: This parameter can be set using either `--label` or `-l`_
626
-
627
- ### Mandatory parameter
628
-
629
- This is the same parameter as the one described in the [above section](#mandatory-parameter), and simply allows you to update whether the release should be considered mandatory or not. Note that `--mandatory` and `--mandatory true` are equivalent, but the absence of this flag is not equivalent to `--mandatory false`. Therefore, if the parameter is ommitted, no change will be made to the value of the target release's mandatory property. You need to set this to `--mandatory false` to explicitly make a release optional.
506
+ ```xml
507
+ <string moduleConfig="true" name="CodePushDeploymentKey">kbAXqSrgEfLPcuvU3Fe0SCqX5HpOVJHvdy5W-g</string>
508
+ ```
630
509
 
631
- ### Description parameter
510
+ As result for our `myAmazingApp_android` app and `Staging` deployment `strings.xml` section related to CodePush will look like this:
632
511
 
633
- This is the same parameter as the one described in the [above section](#description-parameter), and simply allows you to update the description associated with the release (e.g. you made a typo when releasing, or you forgot to add a description at all). If this parameter is ommitted, no change will be made to the value of the target release's description property.
512
+ ```xml
513
+ <string moduleConfig="true" name="CodePushDeploymentKey">kbAXqSrgEfLPcuvU3Fe0SCqX5HpOVJHvdy5W-g</string>
514
+ <string moduleConfig="true" name="CodePushServerUrl">https://api.revopush.org</string>
515
+ ```
634
516
 
635
- ### Disabled parameter
517
+ _Note: If you need to dynamically use a different deployment, you can also override your deployment key in JS code using
518
+ [Code-Push options](https://github.com/microsoft/react-native-code-push/blob/master/docs/api-js.md#CodePushOptions)_
636
519
 
637
- This is the same parameter as the one described in the [above section](#disabled-parameter), and simply allows you to update whether the release should be disabled or not. Note that `--disabled` and `--disabled true` are equivalent, but the absence of this flag is not equivalent to `--disabled false`. Therefore, if the parameter is ommitted, no change will be made to the value of the target release's disabled property. You need to set this to `--disabled false` to explicitly make a release acquirable if it was previously disabled.
638
520
 
639
- ### Rollout parameter
521
+ ## 6. Release updates
640
522
 
641
- This is the same parameter as the one described in the [above section](#rollout-parameter), and simply allows you to increase the rollout percentage of the target release. This parameter can only be set to an integer whose value is greater than the current rollout value. Additionally, if you want to "complete" the rollout, and therefore, make the release available to everyone, you can simply set this parameter to `--rollout 100`. If this parameter is ommitted, no change will be made to the value of the target release's rollout parameter.
523
+ Once your app is configured and distributed to your users, and you have made some JS or asset changes, it's time to release them.
642
524
 
643
- Additionally, as mentioned above, when you release an update without a rollout value, it is treated equivalently to setting the rollout to `100`. Therefore, if you released an update without a rollout, you cannot change the rollout property of it via the `patch` command since that would be considered lowering the rollout percentage.
525
+ Note: For Appcenter users most of the commands in Revopush CLI will look familiar or even identical. For your convenience we will show you
526
+ how to release updates for both platforms so you would adjust your scripts, CI/CD pipelines, etc if any.
644
527
 
645
- ### Target binary version parameter
528
+ ### 6.1 Release updates for iOS
646
529
 
647
- This is the same parameter as the one described in the [above section](#target-binary-version-parameter), and simply allows you to update the semver range that indicates which binary version(s) a release is compatible with. This can be useful if you made a mistake when originally releasing an update (e.g. you specified `1.0.0` but meant `1.1.0`) or you want to increase or decrease the version range that a release supports (e.g. you discovered that a release doesn't work with `1.1.2` after all). If this parameter is ommitted, no change will be made to the value of the target release's version property.
530
+ To push a bundle for iOS to the `Staging` deployment of the `rn2_ios` app, run the following command:
648
531
 
649
532
  ```shell
650
- # Add a "max binary version" to an existing release
651
- # by scoping its eligibility to users running >= 1.0.5
652
- code-push-standalone patch MyApp-iOS Staging -t "1.0.0 - 1.0.5"
653
- ```
654
-
655
- ## Promoting Updates
656
-
657
- Once you've tested an update against a specific deployment (e.g. `Staging`), and you want to promote it "downstream" (e.g. dev->staging, staging->production), you can simply use the following command to copy the release from one deployment to another:
658
-
659
- ```
660
- code-push-standalone promote <appName> <sourceDeploymentName> <destDeploymentName>
661
- [--description <description>]
662
- [--label <label>]
663
- [--disabled <disabled>]
664
- [--mandatory]
665
- [--noDuplicateReleaseError]
666
- [--rollout <rolloutPercentage>]
667
- [--targetBinaryVersion <targetBinaryVersion]
533
+ revopush release-react rn2_ios ios -d Staging
668
534
  ```
669
535
 
670
- The `promote` command will create a new release for the destination deployment, which includes the **exact code and metadata** (description, mandatory and target binary version) from the latest release of the source deployment. While you could use the `release` command to "manually" migrate an update from one environment to another, the `promote` command has the following benefits:
536
+ Under the hood, this command will run `react-native bundle` command to create a bundle and assets,
537
+ then upload them to Revopush server and release the update to the `Staging` deployment of the `rn2_ios` app.
671
538
 
672
- 1. It's quicker, since you don't need to reassemble the release assets you want to publish or remember the description/app store version that are associated with the source deployment's release.
539
+ Upon successful release, you will see something like this:
673
540
 
674
- 2. It's less error-prone, since the promote operation ensures that the exact thing that you already tested in the source deployment (e.g. `Staging`) will become active in the destination deployment (e.g. `Production`).
675
-
676
- We recommend that all users take advantage of the automatically created `Staging` and `Production` environments, and do all releases directly to `Staging`, and then perform a `promote` from `Staging` to `Production` after performing the appropriate testing.
677
-
678
- ### Description parameter
679
-
680
- This is the same parameter as the one described in the [above section](#description-parameter), and simply allows you to override the description that will be used for the promoted release. If unspecified, the new release will inherit the description from the release being promoted.
681
-
682
- ### Label parameter
683
-
684
- This optional parameter allows you to pick the specified label from the source deployment and promote it to the destination deployment. If unspecified, the latest release on the source deployment will be promoted.
685
-
686
- ### Disabled parameter
687
-
688
- This is the same parameter as the one described in the [above section](#disabled-parameter), and simply allows you to override the value of the disabled flag that will be used for the promoted release. If unspecified, the new release will inherit the disabled property from the release being promoted.
541
+ ```shell
542
+ Detecting ios app version:
689
543
 
690
- ### Mandatory parameter
544
+ Using the target binary version value "0.0.1" from "ios/rn2/Info.plist".
691
545
 
692
- This is the same parameter as the one described in the [above section](#mandatory-parameter), and simply allows you to override the mandatory flag that will be used for the promoted release. If unspecified, the new release will inherit the mandatory property from the release being promoted.
546
+ Running "react-native bundle" command:
693
547
 
694
- ### No duplicate release error parameter
548
+ node node_modules/react-native/cli.js bundle --assets-dest /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush --bundle-output /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush/main.jsbundle --dev false --entry-file index.js --platform ios
549
+ Welcome to Metro v0.81.0
550
+ Fast - Scalable - Integrated
695
551
 
696
- This is the same parameter as the one described in the [above section](#no-duplicate-release-error-parameter).
552
+ info Writing bundle output to: /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush/main.jsbundle
553
+ info Done writing bundle output
554
+ info Copying 1 asset files
555
+ info Done copying assets
556
+ private key was not provided
697
557
 
698
- ### Rollout parameter
558
+ Releasing update contents to CodePush:
699
559
 
700
- This is the same parameter as the one described in the [above section](#rollout-parameter), and allows you to specify whether the newly created release should only be made available to a portion of your users. Unlike the other release metadata parameters (e.g. `description`), the `rollout` of a release is not carried over/inherited as part of a promote, and therefore, you need to explicitly set this if you don't want the newly created release to be available to all of your users.
560
+ Upload progress:[==================================================] 100% 0.0s
561
+ Successfully released an update containing the "/var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush" directory to the "Staging" deployment of the "rn2_ios" app.
562
+ ```
701
563
 
702
- ### Target binary version parameter
564
+ where:
565
+ - `rn2_ios` is the application name in Revopush
566
+ - `Staging` is the deployment name in Revopush
567
+ - `ios` is the target platform
703
568
 
704
- This is the same parameter as the one described in the [above section](#target-binary-version-parameter), and simply allows you to override the target binary version that will be used for the promoted release. If unspecified, the new release will inherit the target binary version property from the release being promoted.
569
+ The entire list of available options such as bundle name, entry file, whether this release should be considered mandatory,
570
+ rercentage of users this release should be immediately available to and many others for the `release-react` command can be found in CLI
705
571
 
706
572
  ```shell
707
- # Promote the release to production and make it
708
- # available to all versions using that deployment
709
- code-push-standalone promote MyApp-iOS Staging Production -t "*"
573
+ revopush release-react -h
710
574
  ```
711
575
 
712
- ## Rolling Back Updates
576
+ ### 6.2 Release updates for Android
713
577
 
714
- A deployment's release history is immutable, so you cannot delete or remove an update once it has been released. However, if you release an update that is broken or contains unintended features, it is easy to roll it back using the `rollback` command:
578
+ To push a bundle for Android to the `appcenter-Staging` deployment of the `rn2_android` app, run the following command:
715
579
 
580
+ ```shell
581
+ revopush release-react rn2_android android -d appcenter-Staging
716
582
  ```
717
- code-push-standalone rollback <appName> <deploymentName>
718
- code-push-standalone rollback MyApp-iOS Production
719
- ```
720
-
721
- This has the effect of creating a new release for the deployment that includes the **exact same code and metadata** as the version prior to the latest one. For example, imagine that you released the following updates to your app:
722
-
723
- | Release | Description | Mandatory |
724
- | ------- | ----------------- | --------- |
725
- | v1 | Initial release! | Yes |
726
- | v2 | Added new feature | No |
727
- | v3 | Bug fixes | Yes |
728
583
 
729
- If you ran the `rollback` command on that deployment, a new release (`v4`) would be created that included the contents of the `v2` release.
584
+ Under the hood, this command will run `react-native bundle` command to create a bundle and assets, then upload them to Revopush server and release the update to the `Staging` deployment of the `rn2_android` app.
730
585
 
731
- | Release | Description | Mandatory |
732
- | --------------------------- | ----------------- | --------- |
733
- | v1 | Initial release! | Yes |
734
- | v2 | Added new feature | No |
735
- | v3 | Bug fixes | Yes |
736
- | v4 (Rollback from v3 to v2) | Added new feature | No |
586
+ Upon successful release, you will see something like this:
737
587
 
738
- End-users that had already acquired `v3` would now be "moved back" to `v2` when the app performs an update check. Additionally, any users that were still running `v2`, and therefore, had never acquired `v3`, wouldn't receive an update since they are already running the latest release (this is why our update check uses the package hash in addition to the release label).
588
+ ```shell
589
+ Detecting android app version:
739
590
 
740
- If you would like to rollback a deployment to a release other than the previous (e.g. `v3` -> `v2`), you can specify the optional `--targetRelease` parameter:
591
+ Using the target binary version value "1.0" from "android/app/build.gradle".
741
592
 
742
- ```
743
- code-push-standalone rollback MyApp-iOS Production --targetRelease v34
744
- ```
593
+ Running "react-native bundle" command:
745
594
 
746
- _NOTE: The release produced by a rollback will be annotated in the output of the `deployment history` command to help identify them more easily._
595
+ node node_modules/react-native/cli.js bundle --assets-dest /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush --bundle-output /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush/index.android.bundle --dev false --entry-file index.js --platform android
596
+ Welcome to Metro v0.81.0
597
+ Fast - Scalable - Integrated
747
598
 
748
- ## Viewing Release History
599
+ info Writing bundle output to: /var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush/index.android.bundle
600
+ info Done writing bundle output
601
+ info Copying 1 asset files
602
+ info Done copying assets
603
+ private key was not provided
749
604
 
750
- You can view a history of the 50 most recent releases for a specific app deployment using the following command:
605
+ Releasing update contents to CodePush:
751
606
 
607
+ Upload progress:[==================================================] 100% 0.0s
608
+ Successfully released an update containing the "/var/folders/my/lwrczz7503g5911_wf51jsvm0000gp/T/CodePush" directory to the "appcenter-Staging" deployment of the "rn2_android" app.
752
609
  ```
753
- code-push-standalone deployment history <appName> <deploymentName>
754
- ```
755
-
756
- The history will display all attributes about each release (e.g. label, mandatory) as well as indicate if any releases were made due to a promotion or a rollback operation.
757
-
758
- ![Deployment History](https://cloud.githubusercontent.com/assets/696206/11605068/14e440d0-9aab-11e5-8837-69ab09bfb66c.PNG)
759
610
 
760
- Additionally, the history displays the install metrics for each release. You can view the details about how to interpret the metric data in the documentation for the `deployment ls` command above.
611
+ where:
612
+ - `rn2_android` is the application name in Revopush
613
+ - `appcenter-Staging` is the deployment name in Revopush
614
+ - `android` is the target platform
761
615
 
762
- By default, the history doesn't display the author of each release, but if you are collaborating on an app with other developers, and want to view who released each update, you can pass the additional `--displayAuthor` (or `-a`) flag to the history command.
616
+ The entire list of available options such as bundle name, entry file, whether this release should be considered mandatory,
617
+ rercentage of users this release should be immediately available to and many others for the `release-react` command can be found in CLI
763
618
 
764
- _NOTE: The history command can also be run using the "h" alias_
619
+ ```shell
620
+ revopush release-react -h
621
+ ```
765
622
 
766
- ## Clearing Release History
623
+ ### 6.3 Release history
767
624
 
768
- You can clear the release history associated with a deployment using the following command:
625
+ The release history for deployment of the app can be viewed in Revopush UI or if you prefer CLI by running the following command:
769
626
 
627
+ ```shell
628
+ revopush deployment history rn2_ios Staging
770
629
  ```
771
- code-push-standalone deployment clear <appName> <deploymentName>
772
- ```
773
630
 
774
- After running this command, client devices configured to receive updates using its associated deployment key will no longer receive the updates that have been cleared. This command is irreversible, and therefore should not be used in a production deployment.
631
+ with response like
632
+
633
+ ```shell
634
+ ┌───────┬───────────────┬─────────────┬───────────┬─────────────┬──────────────────────┐
635
+ │ Label │ Release Time │ App Version │ Mandatory │ Description │ Install Metrics │
636
+ ├───────┼───────────────┼─────────────┼───────────┼─────────────┼──────────────────────┤
637
+ │ v1 │ 8 minutes ago │ 0.0.1 │ No │ │ No installs recorded │
638
+ └───────┴───────────────┴─────────────┴───────────┴─────────────┴──────────────────────┘
639
+ ```
640
+
641
+ ## 7. Summary
642
+
643
+ At Revopush we tried to make the migration process as smooth as possible.
644
+ For experienced developers who have been using Appcenter CLI for OTA updates,
645
+ commands in Revopush CLI will look familiar or even identical.
646
+
647
+ For your convenience we created a table with the most common commands you may need to use in Revopush CLI
648
+ (with their analogs in Appcenter CLI):
649
+
650
+ | Appcenter | Revopush | Comment |
651
+ |:---------------------------------|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------:|
652
+ | appcenter login | revopush login | Log in |
653
+ | appcenter codepush deployment | revopush deployment | View and manage your app deployments |
654
+ | appcenter apps | revopush app | View and manage your apps |
655
+ | appcenter codepush patch | revopush patch | Update the metadata for an existing CodePush release |
656
+ | appcenter codepush promote | revopush promote | Create a new release for the destination deployment, which includes the exact code and metadata from the latest release of the source deployment |
657
+ | appcenter codepush release-react | revopush release-react | Release a React Native update to an app deployment |
658
+ | appcenter codepush rollback | revopush rollback | Rollback a deployment to a previous release |
659
+ | appcenter logout | revopush logout | Log out |
660
+
661
+ ### Resources which maybe helpful:
662
+ - React Native CodePush [GitHub](https://github.com/microsoft/react-native-code-push)
663
+ - React Native Client SDK [docs](https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-overview)
664
+ - Best practices for [Multi-Deployment Testing](https://learn.microsoft.com/en-us/appcenter/distribution/codepush/rn-deployment)
665
+
666
+ We hope this guide will help you to migrate your OTA updates from Appcenter to Revopush and start using the new features we provide.
667
+ Your questions, feedback, and suggestions are always welcome. Please feel free to reach out to us at support@revopush.org