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