Meta/ML: handle branches that were indirectly merged a bit better
[alt-git.git] / Announce
blobd9f0d5c3441d753cf17da45433db61bb0e025ee0
1 #!/bin/sh
2 # Announcement message skelton
4 branch=${1?branch}
5 previous=${2?previous}
6 commit=${3-"$1"}
8 relname=$(git describe "$commit") &&
9 vername=$(expr "$relname" : 'v\(.*\)') || exit $?
11 git rev-parse --verify "$previous" >/dev/null || exit $?
13 case "$branch" in
14 maint)
15 kind="The latest maintenance release" ;;
16 mainto/* | maint-[0-9]*)
17 kind="A maintenance release" ;;
18 master)
19 kind="The latest feature release" ;;
20 esac
22 case "$vername" in
23 *-rc[0-9]*)
24 rpmroot=testing
25 vername=$(echo "$vername" | tr "-" ".")
26 kind="A release candidate"
27 for_testing=" for testing"
30 for_testing=
31 rpmroot='RPMS/$arch'
33 esac
35 cat <<EOF
36 To: git@vger.kernel.org
37 Cc: Linux Kernel <linux-kernel@vger.kernel.org>
38 Subject: [ANNOUNCE] Git $relname
40 EOF
42 fmt -68 <<EOF
43 $kind Git $relname is now available$for_testing at the usual places.
44 EOF
46 cat <<\EOF
48 The release tarballs are found at:
50 http://code.google.com/p/git-core/downloads/list
52 and their SHA-1 checksums are:
54 EOF
56 if test -f git-$vername.sign
57 then
58 sed -e '1,/^$/d' -e '/^-----BEGIN PGP SIGNATURE/,$d' git-$vername.sign
61 cat <<EOF
63 Also the following public repositories all have a copy of the $relname
64 tag and the $branch branch that the tag points at:
66 url = git://repo.or.cz/alt-git.git
67 url = https://code.google.com/p/git-core/
68 url = git://git.sourceforge.jp/gitroot/git-core/git.git
69 url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
70 url = https://github.com/gitster/git
72 EOF
74 RelNotes=$(git cat-file blob "${branch}:RelNotes") &&
75 git cat-file blob "${branch}:$RelNotes" |
76 case "$relname" in
77 *-rc[0-9]*)
78 sed -e 's/^Git .* Release Notes$/& (draft)/'
81 cat
83 esac
85 cat <<EOF
87 ----------------------------------------------------------------
89 Changes since $previous are as follows:
91 EOF
93 git log --no-merges "$previous".."$branch" |
94 git shortlog