2.2.0 • Published 7 months ago

capacitor-set-version v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Installation

Use with npx without install:

  npx capacitor-set-version [DIR] -v <value> -b <value> [--json]

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 and build number to the values passed as flags.

For Android, build number means the versionCode option and in iOS it will be CFBundleVersion.

Options

Flags bellow are used to change the default behavior.

USAGE
  $ capacitor-set-version [DIR] -v <value> -b <value> [--json]

ARGUMENTS
  DIR  Capacitor project root directory

OPTIONS
  -b, --build=10       App build number (Integer)
  -v, --version=x.x.x  App version
  --json               Print errors and result as JSON
  -h, --help           Show help

Setting version for iOS or Android only

If you need to update the version in only one platform, you can use the commands "set:ios" or "set:android", accordingly.

# Set android version only
capacitor-set-version set:android -v 1.1.1 -b 100 ./my-app

# Set ios version only
capacitor-set-version set:ios -v 1.1.1 -b 100 ./my-app

Usage

Examples

# Set version to 1.2.3 and build number to 10 on current folder.
capacitor-set-version -v 1.2.3 -b 10

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

# Set android only version and build number
capacitor-set-version set:android -v 1.2.3-rc1 -b 1546 ./my-app

# Set iOS version only
capacitor-set-version set:ios -v 1.2.3 -b 10 ./my-app

Migrating from version 1.x.x

A lot of changes were made from version 1.x.x, with some features being removed. Bellow is a list of all braking changes:

  • Removed reading the version from package.json;
  • Removed auto-increment for version and build numbers;
  • Flags -v and -b are now mandatory;
  • Replaced flags for ios and android with commands "set:ios" and "set:android".

If you need any of these features back, open up an issue relating your use case.

2.2.0

7 months ago

2.1.0

7 months ago

2.0.9

1 year ago

2.0.8

1 year ago

2.0.13

1 year ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.10

1 year ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.3.31

2 years ago

1.3.32

2 years ago

1.3.30

2 years ago

1.3.35

2 years ago

1.3.33

2 years ago

1.3.34

2 years ago

1.3.28

3 years ago

1.3.29

3 years ago

1.3.27

3 years ago

1.3.26

3 years ago

1.3.25

3 years ago

1.3.24

3 years ago

1.3.23

3 years ago

1.3.22

3 years ago

1.3.21

3 years ago

1.3.20

3 years ago

1.3.19

3 years ago

1.3.18

3 years ago

1.3.17

3 years ago

1.3.15

3 years ago

1.3.16

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.10

3 years ago

1.3.9

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.1.0-beta.1

3 years ago

1.1.0-alpha.2

3 years ago

1.2.0-beta.1

3 years ago

1.1.0-alpha.1

3 years ago

1.0.0

3 years ago