You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Add build type option to release cordova command (#409)
* Improved messages to make intention of creating different apps for different platforms more clear
Due to multiple requests in discord chanel, microsoft/react-native-code-push#723, microsoft/react-native-code-push#717
* Add ability to specify build type for Cordova
Also fixes issue #392
* revert changes not related to this PR
* Minor tweak for readme
* Reordered param names for cordova-release command in Readme alphabetically
Copy file name to clipboardExpand all lines: cli/README.md
+17-12Lines changed: 17 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -573,13 +573,14 @@ This specifies the relative path to where the assets, JS bundle and sourcemap fi
573
573
574
574
```shell
575
575
code-push release-cordova <appName><platform>
576
+
[--build]
576
577
[--deploymentName <deploymentName>]
577
578
[--description <description>]
579
+
[--isReleaseBuildType]
578
580
[--mandatory]
579
581
[--noDuplicateReleaseError]
580
-
[--targetBinaryVersion <targetBinaryVersion>]
581
582
[--rollout <rolloutPercentage>]
582
-
[--build]
583
+
[--targetBinaryVersion <targetBinaryVersion>]
583
584
```
584
585
585
586
The `release-cordova` command is a Cordova-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:
@@ -611,6 +612,12 @@ This is the same parameter as the one described in the [above section](#app-name
611
612
612
613
This specifies which platform the current update is targeting, and can be either `ios` or `android` (case-insensitive).
613
614
615
+
#### Build parameter
616
+
617
+
Specifies whether you want to run `cordova build` instead of `cordova prepare` (which is the default behavior), when generating your updated web assets. This is valuable if your project includes before and/or after build hooks (e.g. to transpile TypeScript), and therefore, having CodePush simply run `cordova prepare` isn't sufficient to create and release an update. If left unspecified, this defaults to `false`.
618
+
619
+
*NOTE: This parameter can be set using either --build or -b*
620
+
614
621
#### Deployment name parameter
615
622
616
623
This is the same parameter as the one described in the [above section](#deployment-name-parameter).
@@ -619,6 +626,14 @@ This is the same parameter as the one described in the [above section](#deployme
619
626
620
627
This is the same parameter as the one described in the [above section](#description-parameter).
621
628
629
+
#### Disabled parameter
630
+
631
+
This is the same parameter as the one described in the [above section](#disabled-parameter).
632
+
633
+
#### IsReleaseBuildType parameter
634
+
635
+
If `build` option is true specifies whether perform a release build. If left unspecified, this defaults to `debug`.
636
+
622
637
#### Mandatory parameter
623
638
624
639
This is the same parameter as the one described in the [above section](#mandatory-parameter).
@@ -635,16 +650,6 @@ This is the same parameter as the one described in the [above section](#rollout-
635
650
636
651
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).
637
652
638
-
#### Disabled parameter
639
-
640
-
This is the same parameter as the one described in the [above section](#disabled-parameter).
641
-
642
-
#### Build parameter
643
-
644
-
Specifies whether you want to run `cordova build` instead of `cordova prepare` (which is the default behavior), when generating your updated web assets. This is valuable if your project includes before and/or after build hooks (e.g. to transpile TypeScript), and therefore, having CodePush simply run `cordova prepare` isn't sufficient to create and release an update. If left unspecified, this defaults to `false`.
645
-
646
-
*NOTE: This parameter can be set using either --build or -b*
647
-
648
653
## Debugging CodePush Integration
649
654
650
655
Once you've released an update, and the Cordova or 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:
.example("release-cordova MyApp ios","Releases the Cordova iOS project in the current working directory to the \"MyApp\" app's \"Staging\" deployment")
402
402
.example("release-cordova MyApp android -d Production","Releases the Cordova Android project in the current working directory to the \"MyApp\" app's \"Production\" deployment")
.option("isReleaseBuildType",{alias: "rb",default: false,demand: false,description: "If \"build\" option is true specifies whether perform a release build",type: "boolean"})
404
405
.option("deploymentName",{alias: "d",default: "Staging",demand: false,description: "Deployment to release the update to",type: "string"})
405
406
.option("description",{alias: "des",default: null,demand: false,description: "Description of the changes made to the app in this release",type: "string"})
406
407
.option("disabled",{alias: "x",default: false,demand: false,description: "Specifies whether this release should be immediately downloadable",type: "boolean"})
407
408
.option("mandatory",{alias: "m",default: false,demand: false,description: "Specifies whether this release should be considered mandatory",type: "boolean"})
408
409
.option("noDuplicateReleaseError",{default: false,demand: false,description: "When this flag is set, releasing a package that is identical to the latest release will produce a warning instead of an error",type: "boolean"})
409
410
.option("rollout",{alias: "r",default: "100%",demand: false,description: "Percentage of users this release should be immediately available to",type: "string"})
410
-
.option("targetBinaryVersion",{alias: "t",default: null,demand: false,description: "Semver expression that specifies the binary app version(s) this release is targeting (e.g. 1.1.0, ~1.2.3). If omitted, the release will target the exact version specified in the config.xml file.",type: "string"})
411
+
.option("targetBinaryVersion",{alias: "t",default: null,demand: false,description: "Semver expression that specifies the binary app version(s) this release is targeting (e.g. 1.1.0, ~1.2.3). If omitted, the release will target the exact version specified in the config.xml file.",type: "string"})
0 commit comments