Skip to content

akomelj/capacitor-set-version

 
 

Repository files navigation

capacitor-set-version

Write version number and build number for Android and iOS on ionic/capacitor projects


Build With
oclif semantic release

Installation

Use with npx without install:

  npx capacitor-set-version [options] path

install as a development dependency:

  npm i -D capacitor-set-version

or install globally:

  npm i -g capacitor-set-version

How it works

Calling capacitor-set-version will set your Android and iOS app versions to package.json version as well as increment the app build number.

For Android, build number means the versionCode option, on iOS this will use CFBundleVersion.

If you want, you can specify both version and build number using options flags.

Options

Flags bellow are used to change the default behavior.

USAGE
  $ capacitor-set-version DIR

ARGUMENTS
  DIR  Capacitor project root directory

OPTIONS
  -a, --android        Android only
  -b, --build=10       Set specific build
  -h, --help           Show help
  -i, --ios            iOS only
  -m, --info           Print tool version
  -q, --quiet          Print only error messages
  -v, --version=x.x.x  Set specific version

Usage

Examples

// Set version to 1.2.3
capacitor-set-version -v 1.2.3 ./

// Set version of project on folder ./my-app
capacitor-set-version -v 1.2.3 ./my-app

// Set android version with specific build number for android
capacitor-set-version -a -b 1546 ./

// Set iOS version only
capacitor-set-version -i ./

Hausenn Technologies

About

capacitor-set-version

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 66.3%
  • JavaScript 33.2%
  • Other 0.5%