1.3.2 • Published 7 years ago

gulp-cordova-bump v1.3.2

Weekly downloads
156
License
-
Repository
github
Last release
7 years ago

Bump your Cordova package version

Run this before you run cordova build

This bumps and syncs config.xml, package.json and bower.json semantic versions

Install

$ npm install --save-dev gulp-cordova-bump

Add the following to your gulpfile

gulp.task('bump', function () {
   require('gulp-cordova-bump').run({autofiles: true});
});

Usage

$ gulp bump --patch
$ gulp bump --minor
$ gulp bump --major
$ gulp bump --setversion=2.1.0

You can also specify the location of package.json, bower.json and config.xml by using the following args:

$ gulp bump --patch --packagejson=<package_json_file_path>
$ gulp bump --minor --bowerjson=<bower_json_file_path>
$ gulp bump --major --configxml=<config_xml_file_path>

e.g.

$ gulp bump --setversion=2.1.0 --packagejson="./package.json" --bowerjson="./bower.json" --configxml="./config.xml"

Advanced usage

var bump = require('gulp-cordova-bump');

gulp.task('minorBump', function () {
   bump.run({packageJson: 'subdir/package1.json', minor: true});
});

Tests

More sophisticated examples are in test/gulpfile.js gulp restore will restore the tests to original state

Parameters

Now this package supports multiple files in different directories.

  • packageJson: Array of strings, or a String
  • bowerJson: Array of strings, or a String
  • configXml: Array of strings, or a String
  • singleVersion: Boolean, the first file in the list defines version which will be used for all others.
  • autofiles: Boolean, tries to find package.json, bower.json and config.xml locally
  • setAndroidXmlCode: Function that converts semver string to Number, for config.xml attribute android-versionCode. It is needed if you want to define own version numbers in Android app.

Notes

This tool accept both command line parameters and config parameters in gulp, can be mixed If patch types are mixed, the priority of bumping:

setversion > major > minor > patch

Using spread operator and some other ES6 features that are now supported by Node.js: http://node.green/#spread-------operator

License

MIT License

1.3.2

7 years ago

1.3.1

8 years ago

1.3.0

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago

0.0.15

9 years ago

0.0.14

9 years ago

0.0.13

9 years ago

0.0.12

9 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago