What's cooking (2015/09 #03)
[git.git] / Announce
blob8d7750bfc853324652510c550c37fac872452208
1 #!/bin/sh
2 # Announcement message skelton
4 tmpbase=/var/tmp/git-announce.$$
5 trap 'rm -f $tmpbase.*' 0
6 branch=${1?branch}
7 previous=${2?previous}
8 commit=${3-"$1"}
10 relname=$(git describe "$commit") &&
11 vername=$(expr "$relname" : 'v\(.*\)') || exit $?
13 git rev-parse --verify "$previous" >/dev/null || exit $?
15 case "$branch" in
16 maint)
17 kind="The latest maintenance release" ;;
18 mainto/* | maint-[0-9]*)
19 kind="A maintenance release" ;;
20 master)
21 kind="The latest feature release" ;;
22 esac
24 case "$vername" in
25 *-rc[0-9]*)
26 rpmroot=testing
27 case "$vername" in
28 *-rc0)
29 kind="An early preview release"
32 kind="A release candidate"
34 esac
35 for_testing=" for testing"
38 for_testing=
39 rpmroot='RPMS/$arch'
41 esac
43 vername=$(echo "$vername" | tr "-" ".")
45 git log --use-mailmap --format='%aN,' "$previous" | sort -u >"$tmpbase.prev"
46 git log --use-mailmap --format='%aN,' "$previous..$commit" | sort -u >"$tmpbase.this"
47 comm -12 "$tmpbase.prev" "$tmpbase.this" >"$tmpbase.old"
48 comm -13 "$tmpbase.prev" "$tmpbase.this" >"$tmpbase.new"
50 all=$(wc -l <"$tmpbase.this")
51 new=$(wc -l <"$tmpbase.new")
52 cnt=$(git rev-list --no-merges "$previous..$commit" | wc -l)
54 cat <<EOF
55 To: git@vger.kernel.org
56 Cc: Linux Kernel <linux-kernel@vger.kernel.org>
57 Bcc: lwn@lwn.net
58 Subject: [ANNOUNCE] Git $relname
60 EOF
63 echo "$kind Git $relname is now available$for_testing at the usual places."
64 if test "$branch" = master
65 then
66 cat <<-EOF
67 It is comprised of $cnt non-merge commits since $previous,
68 contributed by $all people, $new of which are new faces.
69 EOF
71 ) | fmt -68
73 cat <<EOF
75 The tarballs are found at:
77 https://www.kernel.org/pub/software/scm/git/${for_testing:+testing/}
79 EOF
82 cat <<-EOF
83 The following public repositories all have a copy of
84 the '$relname' tag and
85 EOF
86 case "$branch" in
87 maint-* | mainto/*)
88 echo "some of them have"
90 esac
91 echo "the '$branch' branch that the tag points at:"
92 ) | fmt -68
94 cat <<\EOF
96 url = https://kernel.googlesource.com/pub/scm/git/git
97 url = git://repo.or.cz/alt-git.git
98 url = git://git.sourceforge.jp/gitroot/git-core/git.git
99 url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
100 url = https://github.com/gitster/git
103 fmt_people () {
104 # Yes, I don't perform well without 2 or more people.
105 # Sue me. The heading says "are as follows" anyway ;-).
106 sed -e '${
107 s/^/and /
108 s/,$/./
109 }' "$1" |
110 fmt -66 |
111 sed -e 's/^/ /'
115 if test "$branch" = master
116 then
117 cat <<-EOF
119 New contributors whose contributions weren't in $previous are as follows.
120 Welcome to the Git development community!
122 $(fmt_people "$tmpbase.new")
124 Returning contributors who helped this release are as follows.
125 Thanks for your continued support.
127 $(fmt_people "$tmpbase.old")
131 cat <<EOF
133 ----------------------------------------------------------------
137 case "$(git ls-tree ${branch} RelNotes)" in
138 120000' '*)
139 RelNotes=$(git cat-file blob "${branch}:RelNotes")
142 RelNotes=RelNotes
144 esac &&
145 git cat-file blob "${branch}:$RelNotes" |
146 case "$relname" in
147 *-*)
148 sed -e 's/^Git .* Release Notes$/& (draft)/' \
149 -e 's/^=============/&========/'
154 esac
156 cat <<EOF
158 ----------------------------------------------------------------
160 Changes since $previous are as follows:
164 git log --no-merges "$previous".."$branch" |
165 git shortlog