- Writes
version
andbuildNumber
to Cordovaconfig.xml
- Can read
version
from localpackage.json
- Has CLI
$ npm install cordova-set-version
const cordovaSetVersion = require('cordova-set-version');
cordovaSetVersion(); // reads version from package.json
cordovaSetVersion('2.4.9');
cordovaSetVersion('./config.alt.xml', '2.4.9');
cordovaSetVersion('./config.alt.xml', 86);
cordovaSetVersion('./config.alt.xml', '2.4.9', 86)
.catch(error => { ... });
cordovaSetVersion([configPath], [version], [buildNumber]): Promise
configPath
(string) - path to yourconfig.xml
version
(string) - version to be writtenbuildNumber
(number) - build number to be written
cordova-set-version [-v|--version <version>] [-b|--build-number <build-number>] [config.xml]
Options:
-v
/--version
- version to set-b
/--build-number
- build number to set--help
- display help
Examples
$ cordova-set-version
$ cordova-set-version -v 2.4.9
$ cordova-set-version -b 86
$ cordova-set-version -v 2.4.9 -b 86