From bf076944e2e7157d3e11800e28bdc8255061de26 Mon Sep 17 00:00:00 2001 From: Sergey Akhalkov Date: Tue, 7 Feb 2017 15:57:41 +0300 Subject: [PATCH] =?UTF-8?q?readme:=20improved=20=E2=80=9CReleasing=20Updat?= =?UTF-8?q?es=E2=80=9D=20and=20=E2=80=9CMulti-Deployment=20Testing?= =?UTF-8?q?=E2=80=9D=20chapters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 https://github.com/Microsoft/react-native-code-push/issues/614 and https://github.com/Microsoft/react-native-code-push/issues/682 --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 20a2a98b1..be8d0b27b 100644 --- a/README.md +++ b/README.md @@ -582,6 +582,8 @@ For more details about how the `release-react` command works, as well as the var 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. +*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.* + ## Multi-Deployment Testing 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. @@ -617,6 +619,12 @@ To set this up, perform the following steps: ... buildTypes { debug { + ... + // CodePush updates should not be tested in Debug mode + ... + } + + releaseStaging { ... buildConfigField "String", "CODEPUSH_KEY", '""' ... @@ -634,6 +642,8 @@ To set this up, perform the following steps: *NOTE: As a reminder, you can retrieve these keys by running `code-push deployment ls -k` from your terminal.* + *NOTE: The naming convention for `releaseStaging` is significant due to [this line](https://github.com/facebook/react-native/blob/e083f9a139b3f8c5552528f8f8018529ef3193b9/react.gradle#L79).* + 4. Pass the deployment key to the `CodePush` constructor via the build config you just defined, as opposed to a string literal. **For React Native >= v0.29**