changelog.sh 467 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # Author: Andrey Nikishaev, Viktor Söderqvist
  3. LOG_FORMAT='* %s [%ci]'
  4. echo "Change log"
  5. echo "=========="
  6. git tag -l | sort -V -u -r | while read TAG ; do
  7. echo
  8. if [ $NEXT ]; then
  9. echo "$NEXT"
  10. echo "-----"
  11. fi
  12. GIT_PAGER=cat git log --no-merges --format="$LOG_FORMAT" $TAG..$NEXT
  13. NEXT=$TAG
  14. done
  15. FIRST=$(git tag -l | head -1)
  16. echo
  17. echo "$FIRST"
  18. echo "-----"
  19. GIT_PAGER=cat git log --no-merges --format="$LOG_FORMAT" $FIRST