Skip to content

Instantly share code, notes, and snippets.

@bengl
Created May 6, 2014 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bengl/e4819d52fcdd84d0b04d to your computer and use it in GitHub Desktop.
Save bengl/e4819d52fcdd84d0b04d to your computer and use it in GitHub Desktop.
handy way to create npm module releases
[alias]
lasttag = describe --abbrev=0 --tags
releasenotes = !bash -c 'git shortlog --no-merges HEAD --not $(git lasttag)'
release = !bash -c 'echo \"%s\n\n$(git releasenotes)\" | xargs -0 npm version $0 -m'
git release major
git release minor
git release patch
# The parameter here is the same as the parameter to `npm version`.
# This will add simple release notes as a tag annotation to your release tag.
# Details:
#
# http://git-scm.com/book/en/Distributed-Git-Maintaining-a-Project#Generating-a-Build-Number
# http://git-scm.com/book/en/Distributed-Git-Maintaining-a-Project#The-Shortlog
# https://www.npmjs.org/doc/cli/npm-version.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment