versions
CLI to flexibly increment a project's version
Last updated a day ago by silverwind .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install versions 
SYNC missed versions from official npm registry.

versions

CLI to flexibly increment a project's version

Installation

npm i -D versions
npx versions --help

Usage

usage: versions [options] patch|minor|major [files...]

  Semantically increment a project's version in multiple files.

  Arguments:
   files                  Files to do version replacement in. The nearest package.json and
                          package-lock.json will always be included unless the -P argument is given
  Options:
    -a, --all             Add all changed files to the commit instead of only the ones currently modified
    -b, --base <version>  Base version to use. Default is parsed from the nearest package.json
    -C, --changelog       Generate a changelog since the base version tag or if absent, the latest tag
    -c, --command <cmd>   Run a command after files are updated but before git commit and tag
    -d, --date [<date>]   Replace dates in format YYYY-MM-DD with current or given date
    -m, --message <str>   Custom tag and commit message. Token _VER_ is available to fill the new version
    -p, --prefix          Prefix git tags with a "v" character
    -r, --replace <str>   Additional replacement in the format "s#regexp#replacement#flags"
    -g, --gitless         Do not perform any git action like creating commit and tag
    -G, --globless        Do not process globs in the file arguments
    -P, --packageless     Do not include package.json and package-lock.json unless explicitely given
    -v, --version         Print the version
    -h, --help            Print this help

  Examples:
    $ versions patch
    $ versions -Cc 'npm run build' -m 'Release _VER_' minor file.css

Signing commits and tags

To automatically sign commits and tags created by versions with GPG add this to your ~/.gitconfig:

[user]
  signingkey = <keyid>
[commit]
  gpgsign = true
[tag]
  forceSignAnnotated = true

CI environments

CI environments usually only do shallow git checkouts which are insuficient for the --changelog argument to work. To fix this, unshallow the repository first:

git fetch --unshallow --quiet --tags

© silverwind, distributed under BSD licence

Current Tags

  • 8.4.0                                ...           latest (a day ago)

27 Versions

  • 8.4.0                                ...           a day ago
  • 8.3.1                                ...           6 days ago
  • 8.3.0                                ...           6 days ago
  • 8.2.11                                ...           6 days ago
  • 8.2.10                                ...           16 days ago
  • 8.2.9                                ...           23 days ago
  • 8.2.8                                ...           a month ago
  • 8.2.7                                ...           2 months ago
  • 8.2.6                                ...           3 months ago
  • 8.2.5                                ...           3 months ago
  • 8.2.4                                ...           3 months ago
  • 8.2.3                                ...           3 months ago
  • 8.2.2                                ...           3 months ago
  • 8.2.1                                ...           3 months ago
  • 8.2.0                                ...           3 months ago
  • 8.1.0                                ...           3 months ago
  • 8.0.4                                ...           3 months ago
  • 8.0.3                                ...           3 months ago
  • 8.0.2                                ...           3 months ago
  • 8.0.1                                ...           3 months ago
  • 8.0.0                                ...           3 months ago
  • 7.0.5                                ...           6 months ago
  • 7.0.4                                ...           6 months ago
  • 7.0.3                                ...           6 months ago
  • 7.0.2                                ...           7 months ago
  • 7.0.1                                ...           7 months ago
  • 7.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 1
This Week 69
This Month 69
Last Day 45
Last Week 157
Last Month 559
Dependencies (0)
None
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |