[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/4] README-release: shorten the circuit to post a news
From: |
Jim Meyering |
Subject: |
Re: [PATCH 2/4] README-release: shorten the circuit to post a news |
Date: |
Mon, 30 Jul 2012 14:45:03 +0200 |
Akim Demaille wrote:
...
> While at it: I see that the release messages from the coreutils are
> much richer (contributors etc.). Is there any desire to move this
> in gnulib?
I've included below the script that I've been using to generate
the added prefix for each release announcement. Here's the generated
text from grep's latest announcement:
[manually inserted lines marked with "**"]
This is to announce grep-2.13, a stable release.
** It's moderately important to upgrade from grep-2.6 or newer,
** since a Turkish I-with-dot (U+0130) on a matched/printed line
** makes "grep -i" (in nearly any UTF-8 locale) emit corrupt output.
There have been 24 commits by 4 people in the 10 weeks since 2.12.
See the NEWS below for a brief summary.
Thanks to everyone who has contributed!
The following people contributed changes to this release:
Aharon Robbins (2)
Jim Meyering (12)
Paolo Bonzini (3)
Paul Eggert (7)
If say one or two like the idea and no one objects,
you're welcome to add it one way or another.
As far as I'm concerned, it can be the default,
but it may deserve to be conditional.
$ cat announce-pre-gen
#!/bin/bash
readable_interval()
{
local sec=$1
local min hr day wk
if test $sec -lt 60; then
echo "$sec seconds"
return
fi
min=$((sec / 60)); : $((sec %= 60))
test 30 -le $sec && : $((min++))
if test $min -lt 60; then
echo "$min minutes"
return
fi
hr=$((min / 60)); : $((min %= 60))
test 30 -le $min && : $((hr++))
if test $hr -lt 24; then
echo "$hr hours"
return
fi
day=$((hr / 24)); : $((hr %= 24))
test 12 -le $hr && : $((day++))
if test $day -lt 24; then
echo "$day days"
return
fi
wk=$((day / 7)); : $((day %= 7))
test 4 -le $day && : $((wk++))
echo "$wk weeks"
return
}
V1=$(cat .prev-version)
V0=$(git show v$V1:.prev-version)
pkg=$(perl -nle '/^PACKAGE = (.*)/ and print $1' Makefile)
n_ci=$(git rev-list v$V0..v$V1|wc -l)
n_p=$(git shortlog v$V0..v$V1|grep -c '^[^ ]')
prev_release_date=$(git log --pretty=%ct -1 v$V0)
this_release_date=$(git log --pretty=%ct -1 v$V1)
n_seconds=$((this_release_date - prev_release_date))
time_since_prev=$(readable_interval $n_seconds)
n_gl_commits=$(( -2 + $(git submodule summary v$V0|wc -l) ))
cat <<EOF
This is to announce $pkg-$V1, a stable release.
There have been $n_ci commits by $n_p people in the $time_since_prev since $V0.
See the NEWS below for a brief summary.
Thanks to everyone who has contributed!
The following people contributed changes to this release:
$(git shortlog v$V0..v$V1|perl -lne '/^(\w.*):/ and print " ".$1')
Jim [on behalf of the $pkg maintainers]
==================================================================
Here is the GNU $pkg home page:
http://gnu.org/s/$pkg/
For a summary of changes and contributors, see:
http://git.sv.gnu.org/gitweb/?p=$pkg.git;a=shortlog;h=v$V1
or run this command from a git-cloned $pkg directory:
git shortlog v$V0..v$V1
To summarize the $n_gl_commits gnulib-related changes, run these commands
from a git-cloned $pkg directory:
git checkout v$V1
git submodule summary v$V0
EOF
- [PATCH 0/4] maint.top: simplify release procedure, Akim Demaille, 2012/07/30
- [PATCH 3/4] maint.mk: provide a web-manual-update target, Akim Demaille, 2012/07/30
- [PATCH 1/4] gnu-web-doc-update: fix --help, Akim Demaille, 2012/07/30
- [PATCH 4/4] maint.mk: use silent-rules support from Automake, Akim Demaille, 2012/07/30
- Re: [PATCH 0/4] maint.top: simplify release procedure, Jim Meyering, 2012/07/30