Skip to content

Commit 3da57cd

Browse files
sergey-akhalkovbuptkang
authored andcommitted
readme: improved “Releasing Updates” and “Multi-Deployment Testing” chapters (microsoft#694)
CodePush updates should be tested in modes other than Debug due to in Debug mode React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply. Relates microsoft#614 and microsoft#682
1 parent 24f4d9e commit 3da57cd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ For more details about how the `release-react` command works, as well as the var
579579

580580
If you run into any issues, or have any questions/comments/feedback, you can ping us within the [#code-push](https://discord.gg/0ZcbPKXt5bWxFdFu) channel on Reactiflux, [e-mail us](mailto:codepushfeed@microsoft.com) and/or check out the [troubleshooting](#debugging--troubleshooting) details below.
581581

582+
*NOTE: CodePush updates should be tested in modes other than Debug mode. In Debug mode, React Native app always downloads JS bundle generated by packager, so JS bundle downloaded by CodePush does not apply.*
583+
582584
## Multi-Deployment Testing
583585

584586
In our [getting started](#getting-started) docs, we illustrated how to configure the CodePush plugin using a specific deployment key. However, in order to effectively test your releases, it is critical that you leverage the `Staging` and `Production` deployments that are auto-generated when you first created your CodePush app (or any custom deployments you may have created). This way, you never release an update to your end users that you haven't been able to validate yourself.
@@ -614,6 +616,12 @@ To set this up, perform the following steps:
614616
...
615617
buildTypes {
616618
debug {
619+
...
620+
// CodePush updates should not be tested in Debug mode
621+
...
622+
}
623+
624+
releaseStaging {
617625
...
618626
buildConfigField "String", "CODEPUSH_KEY", '"<INSERT_STAGING_KEY>"'
619627
...
@@ -631,6 +639,8 @@ To set this up, perform the following steps:
631639

632640
*NOTE: As a reminder, you can retrieve these keys by running `code-push deployment ls <APP_NAME> -k` from your terminal.*
633641

642+
*NOTE: The naming convention for `releaseStaging` is significant due to [this line](https://github.com/facebook/react-native/blob/e083f9a139b3f8c5552528f8f8018529ef3193b9/react.gradle#L79).*
643+
634644
4. Pass the deployment key to the `CodePush` constructor via the build config you just defined, as opposed to a string literal.
635645

636646
**For React Native >= v0.29**

0 commit comments

Comments
 (0)