Remove some evil tabs
[dana/openbox.git] / release / bugs
1 #!/bin/sh
2
3 help() {
4   echo "Usage: $0 <revision> [lastrelease]"
5   echo
6   echo "  <revision>    The revision which should be used for release."
7   echo "  [lastrelease] The revision of the most recent release made."
8   echo "                By default it uses the most recent release-tag."
9   exit 1
10 }
11
12 error() {
13   echo "error: $1"
14   exit 1
15 }
16
17 test -e "./openbox/openbox.c" || \
18   error "must be run from the project's top level directory"
19
20 REV="$1"
21 test -z "$REV" && help
22 RELEASE_SHA=$(git rev-parse "$REV")
23 test $? = 0 || error "revision $REV not found"
24
25 LAST="$2"
26 if test -z "$LAST"; then
27     LAST=$(git describe --match 'release-*' $REV)
28     test $? = 0 || \
29         error "unable to find last release"
30 fi
31
32 #### CHANGELOG #####
33 git log --no-merges $LAST..$REV --oneline|egrep '[bB][uU][Gg] #?[0-9]+'
34 git log --no-merges $LAST..$REV --oneline | \
35   perl -n -e'/[bB][uU][Gg] #?([0-9]+)/ && print "#$1, "'
36 perl -e'print "\b\b \n"'
37
38 exit 0