Created
September 30, 2016 08:45
-
-
Save thevangelist/5a7b732406d2e713ae1e6de073a30403 to your computer and use it in GitHub Desktop.
Semver versioning with git tags & npm version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convenience script for versioning | |
# Pass a semver-formatted version number to this script such as `npm version 2.1.0`. | |
# | |
# You'll get: | |
# 1) git tag such as v2.1.0 | |
# 2) new version to `package.json` | |
npm version $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is a way to validate the first arguments presence: