react-native/react-native-git-upgrade
Nicolas Cuillery 1116a59019 Allow binary files to be upgraded
Summary:
`react-native-git-upgrade` doesn't handle the binary files. An error is thrown if the user has changed the default Android icons. See #11402

With this PR, the upgrader would also be ready for the assets optimization: #10408 by GantMan

- Publish `react-native-git-upgrade` to sinopia
- `npm install -g react-native-git-upgrade`

- Init a new project with an old version: `react-native init MyApp --version=0.40.0`
- Replace an Android icon (i.e. `MyApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png`) by any other image file.
- Change the content of a text file.
- Run `react-native-git-upgrade`

👉 The project is upgraded successfully.
👉 The replaced image file is still here.
👉 The text change is still here.

- Replace an Android icon in the RN sources (i.e. https://github.com/facebook/react-native/blob/master/local-cli/templates/HelloWorld/android/app/src/mai
Closes https://github.com/facebook/react-native/pull/12201

Differential Revision: D4543190

Pulled By: mkonicek

fbshipit-source-id: f1df32ee064557220deed717a129c3e175a6e9e2
2017-02-10 07:30:44 -08:00
..
README.md Git upgrade: Tweak wording 2016-12-05 06:28:34 -08:00
checks.js Fix the parse error when specifying an unknown version. 2016-12-02 08:28:32 -08:00
cli.js New upgrading process, relying on Git 2016-11-28 08:28:35 -08:00
cliEntry.js Allow binary files to be upgraded 2017-02-10 07:30:44 -08:00
index.js Use Yarn if available 2016-12-02 00:13:32 -08:00
package.json Allow binary files to be upgraded 2017-02-10 07:30:44 -08:00
yarn.js Git upgrade: Tweak README, bump version, fix a bug 2016-12-05 05:58:29 -08:00

README.md

React Native Git Upgrade

This tool makes upgrading your apps to a new version of React Native easier than the stock react-native upgrade command.

It uses Git under the hood to automatically resolve merge conflicts in project templates (native iOS and Android files, .flowconfig etc.). These conflicts happen when a new React Native version introduces changes to those files and you have local changes in those files too, which is quite common.

Usage

See the Upgrading docs on the React Native website.

Basic usage:

$ npm install -g react-native-git-upgrade
$ cd MyReactNativeApp
$ react-native-git-upgrade