Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.13 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.13 KB

react-native-version

react-native-version extend the behaviour of npm version. react-native-version docs

The fork adds:

--never-increment-prerelease detect prerelease version and use --never-increment-build

--version-build to set version to build number

npm-scripts hook (automatic method)

Setup

npm i github:wowmaking/react-native-version#<commit-hash> --save-dev

Hook into the "version" or "postversion" npm script in your app's package.json:

{
  "name": "AwesomeProject",
  "scripts": {
+   "postversion": "react-native-version --never-increment-prerelease -t android && react-native-version --version-build -t ios"
  }
}

Usage

Just run npm version <newversion>.

react-native-version will then update your android/ and ios/ code. Depending on the script and options you choose, it can also automatically amend the version bump commit and update the Git tag created by npm version. This method should be useful in most cases. If you need more control, take a look at the CLI and options below.