• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MichaelTaylor3D/gulp-cordova-bump: Bump your cordova package version

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

MichaelTaylor3D/gulp-cordova-bump

开源软件地址(OpenSource Url):

https://github.com/MichaelTaylor3D/gulp-cordova-bump

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

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 --prerelease
$ 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 > prerelease

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

License

MIT License

Donate

ENS: michaeltaylor3d.eth

ETHER ADDRESS: 0x411b4F2dCFE158114d9396A30c625Bf7DefAD880




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap