Giter VIP home page Giter VIP logo

react-native-semver-update's Introduction

React Native Semver Update

Automaticly updates a project version and build number in:

  • package.json
  • iOS
  • Android

Install

Install global package by:

npm i -g react-native-semver-update

Usage

Change Version by Manual Control

  1. Write commmand in terminal and press [enter]:
rnsemup
  1. Choose what do you need from menu.

Auto Increase by cli

Build Number:

rnsemup -b

Project Version:

rnsemup -u <unit>

where unit is:

  • major 1.2.3 → 2.0.0
  • minor 1.2.3 → 1.3.0
  • patch 1.2.3 → 1.2.4

For example:

rnsemup -b -u minor
  1. Increase build number
  2. Increase minor in project version
  3. Set patch is 0

How it works

  1. It find files in current directory by defined paths array (see paths.js)
PACKAGE: resolve(CURRENT_DIRECTORY_PATH, './package.json'),
ANDROID: resolve(CURRENT_DIRECTORY_PATH, './android/app/build.gradle'),
IOS: resolve(CURRENT_DIRECTORY_PATH, './ios/<YOUR PROJECT NAME FROM app.json>.xcodeproj/project.pbxproj'),
  1. Find & replace versions by regular expressions (see searchPatterns.js)
Android
- versionName
- versionCode

iOS
- MARKETING_VERSION
- CURRENT_PROJECT_VERSION
  1. Display previous and new versions in terminal

Support

  • react-native 0.60+

Why?

react-native-semver-update's People

Contributors

dependabot[bot] avatar zmnv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-semver-update's Issues

improvement: automate command

I don't know if you would like to improve your tool but it would be a great feature (and for me the perfect app) if you could pass a parameter and update all parameters automatically

for example: rnsemup -version 1.0.1 would do:
set version 1.0.1 for all platform
increment android build by 1
set ios build to 0 (or 1) if version increased, or increase if same version.

Right now I use React-native-version but it increases forever and don't support increment only build version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.