Revopush 2.0 Migration guide
This guide will help you to migrate from Revopush 1.x to 2.0. If you have not used Revopush yet, please refer user guide.
Configure CLI
To get all the benefits of Revopush 2.0 you need to use the latest version of CLI (0.0.8 and above). If you had one installed you can upgrade it
npm upgrade -g @revopush/code-push-clior in case of CI/CD you need to install it
npm install -g @revopush/code-push-cli@0.0.8Ensure revopush -v is 0.0.8 and above
revopush -v
0.0.8Configure Revopush SDK
Your app needs to use Revopush SDK 2.5.0-rc.2 and above. To update version of Revopush SDK in the root folder of the app execute
npm install @revopush/react-native-code-push@2.5.0-rc.2Make a release
To use Diff updates together with Revopush SDK 2.0, you must first create a base release for the specific binary version of the app you are targeting.
What is a base release?
A base release is a snapshot of your assets and JavaScript bundle exactly as they were shipped to the app stores together with your IPA/APK.
This snapshot is then used as a baseline to generate diffs only for assets and the JS bundle that already exist in the store build and on users’ devices.
As a result, update payload sizes are reduced by 10–20×, and update delivery to users becomes significantly faster.
To create a base release, you first need to build release APK/IPA files for the target platform and then provide these files as CLI parameters to create the base release.
revopush release-native <APPLICATION_NAME> ios ./path_to_ipa/app.iparevopush release-react <APPLICATION_NAME> android ./path_to_ipa/app.apkFull command specification:
revopush release-native <appName> <platform> <targetBinary> [options]
Options:
--help Show help [boolean]
-d, --deploymentName Deployment to release the update to [string] [default: "Staging"]
-t, --targetBinaryVersion Semver expression that specifies the binary app version(s) this release is targeting (e.g. 1.1.0, ~1.2.3). [string] [default: null]
-v, --version Show version number [boolean]Regular release
revopush release-react <APPLICATION_NAME> ios -d <DEPLOYMENT_NAME>revopush release-react <APPLICATION_NAME> android -d <DEPLOYMENT_NAME>WARNING
To properly calculate diff updates when using -o or --outputDir parameter, the output directory must end with CodePush.
For example:
revopush release-react <APPLICATION_NAME> android -d <DEPLOYMENT_NAME> -o ./build/CodePushRead more about Releases in Releasing updates guide