summaryrefslogtreecommitdiff
path: root/helpers/xfce-get-release-notes
blob: d37f65f03a9bdc2a6f63b2fce0081093e1d0a3f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

SILENT=$2
LINE_LENGTH=72
LAST_TAG=$(git describe --abbrev=0)

if [ -n "$1" ]; then
    LAST_TAG=$1
else
    if [ "$SILENT" != "silent" ]; then
        echo "Changes since $LAST_TAG:"
    fi
fi

git log --format=%s ${LAST_TAG}..HEAD | \
  grep -v "Updates for release" | \
  grep -v "Update translation" | \
  grep -v "Add new translation" | \
  grep -v "Back to development" | \
  while read line; do \
    echo "- $line" | \
    fold -s -w $LINE_LENGTH - | \
    sed -e "s/^[^ ]/&/g"
  done