pv

patch-version

Patch version on package.json when deploy to npm.

Showing:

Popularity

Downloads/wk

31

GitHub Stars

0

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

patch-version Build Status

Patch git tag version to package.json before publish to npm.

Usage

  1. Install patch-version from npm.
  2. Stick your package.json to one version. My suggestion is 0.0.1, as this package does.
  3. Add patch-version command to deployment hook in your CI configuration file.
  4. When you want to publish a new version to npm, create a tag with a valid semver, push it to trigger CI build and deployment. The tag version will be patched to package.json before publish to npm.

Supported CI

  • Travis
  • GitLab
  • AppVeyor

Example

Here is the example configuration for Travis CI. A full example could be the .travis.yml file of this project.

before_deploy:
  - ./node_modules/.bin/patch-version

deploy:
  provider: npm
  email: my@email.com
  api_key:
    secure: this-is-my-secure-key
  on:
    tags: true

License

MIT License.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100