Meta/Dothem: do not barf if /dev/shm is not writable
[git/jrn.git] / Announce
blobd3569850c898e99dc2dd31ab71ce94dc33f2cd8c
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 case "$vername" in
27 *-rc0)
28 kind="An early preview"
31 kind="A release candidate"
33 esac
34 for_testing=" for testing"
37 for_testing=
38 rpmroot='RPMS/$arch'
40 esac
42 cat <<EOF
43 To: git@vger.kernel.org
44 Cc: Linux Kernel <linux-kernel@vger.kernel.org>
45 Bcc: lwn@lwn.net
46 Subject: [ANNOUNCE] Git $relname
48 EOF
50 fmt -68 <<EOF
51 $kind Git $relname is now available$for_testing at the usual places.
52 EOF
54 cat <<\EOF
56 The release tarballs are found at:
58 http://code.google.com/p/git-core/downloads/list
60 and their SHA-1 checksums are:
62 EOF
64 if test -f git-$vername.sign
65 then
66 sed -e '1,/^$/d' -e '/^-----BEGIN PGP SIGNATURE/,$d' git-$vername.sign
69 cat <<EOF
71 Also the following public repositories all have a copy of the $relname
72 tag and the $branch branch that the tag points at:
74 url = git://repo.or.cz/alt-git.git
75 url = https://code.google.com/p/git-core/
76 url = git://git.sourceforge.jp/gitroot/git-core/git.git
77 url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
78 url = https://github.com/gitster/git
80 EOF
82 RelNotes=$(git cat-file blob "${branch}:RelNotes") &&
83 git cat-file blob "${branch}:$RelNotes" |
84 case "$relname" in
85 *-rc[0-9]*)
86 sed -e 's/^Git .* Release Notes$/& (draft)/'
89 cat
91 esac
93 cat <<EOF
95 ----------------------------------------------------------------
97 Changes since $previous are as follows:
99 EOF
101 git log --no-merges "$previous".."$branch" |
102 git shortlog