blob: 8ac01306e347cc82081a35e803ed40dcb12f7745 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
#!/bin/sh
# Announcement message skelton
#
: ${MASTER=master}
tmpbase=/var/tmp/git-announce.$$
trap 'rm -f $tmpbase.*' 0
branch=${1?branch}
previous=${2?previous}
commit=${3-"$1"}
relname=$(git describe "$commit") &&
vername=$(expr "$relname" : 'v\(.*\)') || exit $?
git rev-parse --verify "$previous" >/dev/null || exit $?
case "$branch" in
maint)
kind="The latest maintenance release" ;;
mainto/* | maint-[0-9]*)
kind="A maintenance release" ;;
$MASTER)
kind="The latest feature release" ;;
esac
case "$vername" in
*-rc[0-9]*)
rpmroot=testing
case "$vername" in
*-rc0)
kind="An early preview release"
;;
*)
kind="A release candidate"
;;
esac
for_testing=" for testing"
;;
*)
for_testing=
rpmroot='RPMS/$arch'
;;
esac
vername=$(echo "$vername" | tr "-" ".")
people () {
git shortlog -s --no-merges \
--group=author \
--group=trailer:co-authored-by \
--group=trailer:reviewed-by \
--group=trailer:mentored-by \
--group=trailer:helped-by \
--group=trailer:tested-by \
--group=trailer:reported-by \
"$@" |
sed -e 's/^[ 0-9]*[ ]//' -e 's/$/,/' |
sort -u
}
people "$previous" >"$tmpbase.prev"
people "$previous..$commit" >"$tmpbase.this"
comm -12 "$tmpbase.prev" "$tmpbase.this" >"$tmpbase.old"
comm -13 "$tmpbase.prev" "$tmpbase.this" >"$tmpbase.new"
all=$(wc -l <"$tmpbase.this")
new=$(wc -l <"$tmpbase.new")
cnt=$(git rev-list --no-merges "$previous..$commit" | wc -l)
cat <<EOF
To: git@vger.kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
git-packagers@googlegroups.com
Bcc: lwn@lwn.net, gitster@pobox.com
Subject: [ANNOUNCE] Git $relname
EOF
(
echo "$kind Git $relname is now available$for_testing at the usual places."
if test "$branch" = $MASTER
then
cat <<-EOF
It is comprised of $cnt non-merge commits since $previous,
contributed by $all people, $new of which are new faces [*].
EOF
fi
) | fmt -68
cat <<EOF
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/${for_testing:+testing/}
EOF
(
cat <<-EOF
The following public repositories all have a copy of
the '$relname' tag and
EOF
case "$branch" in
maint-* | mainto/*)
echo "some of them have"
;;
esac
echo "the '$branch' branch that the tag points at:"
) | fmt -68
cat <<\EOF
url = https://git.kernel.org/pub/scm/git/git
url = https://kernel.googlesource.com/pub/scm/git/git
url = git://repo.or.cz/alt-git.git
url = https://github.com/gitster/git
EOF
fmt_people () {
# Yes, I don't perform well without 2 or more people.
# Sue me. The heading says "are as follows" anyway ;-).
sed -e '${
s/^/and /
s/,$/./
}' "$1" |
fmt -66 |
sed -e 's/^/ /'
}
if test "$branch" = $MASTER
then
cat <<-EOF
New contributors whose contributions weren't in $previous are as follows.
Welcome to the Git development community!
$(fmt_people "$tmpbase.new")
Returning contributors who helped this release are as follows.
Thanks for your continued support.
$(fmt_people "$tmpbase.old")
[*] We are counting not just the authorship contribution but issue
reporting, mentoring, helping and reviewing that are recorded in
the commit trailers.
EOF
fi
cat <<EOF
----------------------------------------------------------------
EOF
case "$(git ls-tree ${branch} RelNotes)" in
120000' '*)
RelNotes=$(git cat-file blob "${branch}:RelNotes")
;;
*)
RelNotes=RelNotes
;;
esac &&
git cat-file blob "${branch}:$RelNotes" |
case "$relname" in
*-*)
sed -e 's/^Git .* Release Notes$/& (draft)/' \
-e 's/^=============/&========/'
;;
*)
cat
;;
esac
cat <<EOF
----------------------------------------------------------------
Changes since $previous are as follows:
EOF
git log --no-merges "$previous".."$branch" |
git shortlog
|