Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit a43af79

Browse files
committed
Merge pull request #184 from Microsoft/doc_updates
Doc updates
2 parents 7d456e9 + 35b717f commit a43af79

File tree

1 file changed

+41
-36
lines changed

1 file changed

+41
-36
lines changed

cli/README.md

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ When the metrics cell reports `No installs recorded`, that indicates that the se
227227

228228
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 three different commands for releasing updates:
229229

230-
1. [General](#releasing-updates-general) - Simply uploads an update to the CodePush server, and therefore, provides the most flexibility in terms of how to generate the update in the first place (e.g. are you using a `gulp` task? running a custom shell script?), since it doesn't apply any opinion about it.
230+
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.
231231

232-
2. [React Native](#releasing-updates-react-native) - Performs the same functionality as the general release command, but also handles the work of generating the updated contents for you (JS bundle and assets), instead of requiring you to run both `react-native bundle` and then `code-push release`.
232+
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 release`.
233233

234-
3. [Cordova](#releasing-updates-cordova) - Performs the same functionality as the general release command, but also handles the work of preparing the app update for you, instead of requiring you to run both `cordova prepare` and then `code-push release`.
234+
3. [Cordova](#releasing-updates-cordova) - Performs the same functionality as the general release command, but also handles the task of preparing the app update for you, instead of requiring you to run both `cordova prepare` and then `code-push release`.
235235

236236
Which of these commands you should use is mostly a matter of requirements and/or preference. However, we generally recommend using the relevant 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.
237237

@@ -248,13 +248,13 @@ code-push release <appName> <updateContents> <targetBinaryVersion>
248248

249249
#### App name parameter
250250

251-
This specifies the name of the CodePush app that this update is being released for.
251+
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 app add` (e.g. "MyApp-Android"). If you need to look it up, you can run the `code-push app ls` command to see your list of apps.
252252

253253
#### Update contents parameter
254254

255-
This specifies the location of the 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 (e.g. the `/platforms/ios/www` folder for a Cordova app). 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.
255+
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 (e.g. the `/platforms/ios/www` folder for a Cordova app). 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.
256256

257-
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 point at using the `updateContents` parameter:
257+
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:
258258

259259
| Platform | Prepare command | Package path (relative to project root) |
260260
|----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
@@ -310,12 +310,6 @@ This provides an optional "change log" for the deployment. The value is simply r
310310

311311
*NOTE: This parameter can be set using either "--description" or "-desc"*
312312

313-
#### Disabled parameter
314-
315-
This specifies whether an update should be disabled. A disabled update is one that is not acquirable by clients. If left unspecified, the update will not be disabled, i.e. clients configured to receive updates from the particular deployment will receive the update [if it applies to them](#target-binary-version-parameter).
316-
317-
*NOTE: This parameter can be set using either "--disabled" or "-x"*
318-
319313
#### Mandatory parameter
320314

321315
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.
@@ -354,6 +348,12 @@ This specifies the percentage of users (as an integer between `1` and `100`) tha
354348

355349
*NOTE: This parameter can be set using either `--rollout` or `-r`*
356350

351+
#### Disabled parameter
352+
353+
This specifies whether an update should be acquirable 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 expicitly [patch it](#patching-releases) when you want end users to be able to download it (e.g. an announcement blog post went live).
354+
355+
*NOTE: This parameter can be set using either "--disabled" or "-x"*
356+
357357
### Releasing Updates (React Native)
358358

359359
```shell
@@ -407,10 +407,6 @@ This is the same parameter as the one described in the [above section](#app-name
407407

408408
This specifies which platform the current update is targeting, and can be either `ios` or `android` (case-insensitive).
409409

410-
#### Bundle name parameter
411-
412-
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) and `index.android.bundle` (Android).
413-
414410
#### Deployment name parameter
415411

416412
This is the same parameter as the one described in the [above section](#deployment-name-parameter).
@@ -419,34 +415,38 @@ This is the same parameter as the one described in the [above section](#deployme
419415

420416
This is the same parameter as the one described in the [above section](#description-parameter).
421417

422-
#### Development parameter
418+
#### Mandatory parameter
423419

424-
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.
420+
This is the same parameter as the one described in the [above section](#mandatory-parameter).
421+
422+
#### Rollout parameter
423+
424+
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.
425+
426+
#### Target binary version parameter
427+
428+
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.
425429

426430
#### Disabled parameter
427431

428432
This is the same parameter as the one described in the [above section](#disabled-parameter).
429433

434+
#### Development parameter
435+
436+
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.
437+
430438
#### Entry file parameter
431439

432440
This specifies the relative path to app's root/entry JavaScript file. If left unspecified, this defaults to `index.ios.js` (for iOS) or `index.android.js` (for Android) if that file exists, or `index.js` otherwise.
433441

434-
#### Mandatory parameter
442+
#### Bundle name parameter
435443

436-
This is the same parameter as the one described in the [above section](#mandatory-parameter).
444+
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) and `index.android.bundle` (Android).
437445

438446
#### Sourcemap output parameter
439447

440448
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.
441449

442-
#### Target binary version parameter
443-
444-
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.
445-
446-
#### Rollout parameter
447-
448-
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.
449-
450450
### Releasing Updates (Cordova)
451451

452452
```shell
@@ -495,25 +495,25 @@ This is the same parameter as the one described in the [above section](#deployme
495495

496496
This is the same parameter as the one described in the [above section](#description-parameter).
497497

498-
#### Disabled parameter
499-
500-
This is the same parameter as the one described in the [above section](#disabled-parameter).
501-
502498
#### Mandatory parameter
503499

504500
This is the same parameter as the one described in the [above section](#mandatory-parameter).
505501

502+
#### Rollout parameter
503+
504+
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.
505+
506506
#### Target binary version parameter
507507

508508
This is the same parameter as the one described in the [above section](#target-binary-version-parameter). If left unspecified, the command defaults to targeting only the specified version in the project's metadata (`Info.plist` if this update is for iOS clients, and `build.gradle` for Android clients).
509509

510-
#### Rollout parameter
510+
#### Disabled parameter
511511

512-
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.
512+
This is the same parameter as the one described in the [above section](#disabled-parameter).
513513

514514
## Patching Updates
515515

516-
After releasing an update, there may be scenarios where you need to modify one or more of the attributes associated with the release (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:
516+
After releasing an update, there may be scenarios where you need to modify one or more of the 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:
517517

518518
```shell
519519
code-push patch <appName> <deploymentName>
@@ -525,9 +525,14 @@ code-push patch <appName> <deploymentName>
525525

526526
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.
527527

528+
```shell
529+
code-push patch MyApp Production -m
530+
code-push patch MyApp Production -l v23 -rollout 50%
531+
```
532+
528533
#### Label Parameter
529534

530-
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.
535+
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 deployment history` command and refer to the `Label` column.
531536

532537
*NOTE: This parameter can be set using either `--label` or `-l`*
533538

0 commit comments

Comments
 (0)