Skip to content

Instantly share code, notes, and snippets.

@kevinbowen777
Last active July 25, 2019 19:28
Show Gist options
  • Save kevinbowen777/488a7f7ecff4922c5f55a198968239a3 to your computer and use it in GitHub Desktop.
Save kevinbowen777/488a7f7ecff4922c5f55a198968239a3 to your computer and use it in GitHub Desktop.
xfce-get-release-notes
#!/usr/bin/env bash
IGNORE_LIST="grep -iv \"Update translation\" \
| grep -iv \"Add new translation\" \
| grep -iv \"Updates for release\" \
| grep -iv \"^Post release tag bump\" \
| grep -iv \"Fix typo\" \
| grep -iv \"gitignore\" \
| grep -iv \"Bump\" \
| grep -iv \"Fix comments\" \
| grep -iv \"Back to development\" \
| grep -iv \"NEWS\" \
| grep -iv \"Fix icon\" \
| grep -iv \"copyright\" \
| grep -iv \"docs\" \
| grep -iv \"indentation\" \
| grep -iv \"code\" \
| grep -iv \"compiler\" \
| grep -iv \"cleanup\""
LINE_LENGTH=72
LAST_TAG=$(git describe --abbrev=0)
if [ "$1" = "" ]; then
echo "Here are the changes since the tag $LAST_TAG"
git log --format=%s ${LAST_TAG}..HEAD | eval "$IGNORE_LIST" | while read line; do echo " - $line" | fold -s -w $LINE_LENGTH - | sed -e "s/^[^ ]/ &/g";done
else
echo "Here are the changes since the tag $1"
git log --format=%s $1..HEAD | eval "$IGNORE_LIST" | while read line; do echo " - $line" | fold -s -w $LINE_LENGTH - | sed -e "s/^[^ ]/ &/g";done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment