Skip to content

Instantly share code, notes, and snippets.

@paganotoni
Last active March 23, 2017 17:07
Show Gist options
  • Save paganotoni/8f3dbf0652ccef387940353ab760d7fe to your computer and use it in GitHub Desktop.
Save paganotoni/8f3dbf0652ccef387940353ab760d7fe to your computer and use it in GitHub Desktop.
Release script from commits.
#!/bin/sh
git log $(git describe --tags $(git rev-list --tags --max-count=1))...HEAD --pretty=format:'* %s ' --reverse | grep -v Merge | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md
echo "\n**** Version $1" | cat - CHANGELOG.md > temp && mv temp CHANGELOG.md
git tag -a $1 -m "Version $1 released"
echo "$1" > version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment