next-version

Imcrement version on multiple files

next-version

Change version numbers in multiple files using semver.

Checks the highest version number in the specified files and changes all to the highest number. It can bump major, minor or patch following semver. It can append a release and/or build suffix. Build number can also be extracted from the number of Git commits.

It can even bump itself!

Javascript

var version = require('next-version');
version(files,options,callback);

Options

options.major

Type: Boolean|NumberDefault value: false

options.minor

Type: Boolean|NumberDefault value: false

options.patch

Type: Boolean|NumberDefault value: true

options.version

Type: String

options.git

Type: BooleanDefault value: falseAppends a build number based on the number of GIT commits, ie: v1.2.3+897.

options.regex

Type: Regexp|Regexp[]Default value: /\d+\.\d+\.\d+/

examples

var version = require('next-version');
version(['foo.txt','bar.txt'],{minor:true},console.log.bind(console,'done');

CLI

Usage: next-version [options] <files ...>

Options:

-h, --help output usage information -m, --major [major] Bump or set major version -i, --minor [minor] Bump or set minor version -p, --patch [patch] Bump or set patch version -v, --version [version] Set the full version number -b, --build [build] The build number -g, --git Git revision number as build number -r, --regex [regex] Regex to find version number with

examples

next-version --major=3 foo.js bar.js

next-version --minor=3 foo.js bar.js

next-version --patch=3 foo.js bar.js

next-version --vs="2.3.4" foo.js bar.js

HomePage

http://next-version.sjeiti.com/

Repository

https://github.com/Sjeiti/next-version.git


上一篇:karma-chai-jquery
下一篇:grunt-ftp-deploy

相关推荐

  • 使用 core-version-manager 解决版本号的问题

    最近在写工具处理的时候,想到做这么一个库,用于解决版本号之间的问题,比如打小,比较等问题。常见的比如确定 A/B 两个版本谁比较新,又或者 选出一系列版本中最大的。

    2 年前
  • 代码风格统一:commitlint & eslint & standard-version

    Commitlint 配置 添加包 yarn add @commitlint/cli @commitlint/configconventional husky D ...

    2 年前
  • win-version-info

    Windowsonly native addon to read version info from executables winversioninfo Windowsonly native ...

    1 年前
  • webpack-auto-inject-version

    Webpack plugin for auto inject version from package.json Auto inject version Webpack plugin Adds ...

    24 天前
  • webidl-conversions

    Implements the WebIDL algorithms for converting to and from JavaScript values Web IDL Type Convers...

    2 年前
  • versiony

    A module to increment version number for your code/module. Support for npm/bower/custom files. ciim...

    10 个月前
  • versionup

    Increment version number in package.json (or bower.json) versionup ========== Build Statusbdt...

    1 年前
  • version-tree

    Version tracking data structure versiontree ============ A data structure for maintaining a tree of...

    1 年前
  • version-io

    Semantic versioning tool. Apply major, minor, patch and version to package.json. Versionio Semant...

    1 年前
  • version-changed

    Checks if the version in has changed since the last commit. versionchanged Checks if the versio...

    8 天前

官方社区

扫码加入 JavaScript 社区