Skip to content

Instantly share code, notes, and snippets.

@franzese
Created January 3, 2020 20:49
Show Gist options
  • Save franzese/6254548f234cd2b76d5af7433fc813e4 to your computer and use it in GitHub Desktop.
Save franzese/6254548f234cd2b76d5af7433fc813e4 to your computer and use it in GitHub Desktop.
Generate git release notes from last tag to current HEAD
#!/bin/sh
# gets tag from current branch
# --abbrev set to 0 to find the closest tagname without any suffix
previousTag=$(git describe --abbrev=0 --tags)
messages=$(git log --pretty=format:"- %s (%h)" "$previousTag"...HEAD)
echo "## Commits in this release:"
echo "$messages"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment