6 fmt="%-10s | %7d %7d %7d | %7d %7d | %-10s\n"
7 hfmt
=$
(printf "%s" "$fmt" |
sed -e 's/d/s/g')
8 head=$
(printf "$hfmt" release new this total this total
date)
11 git for-each-ref
--format='%(refname:short)' refs
/tags
/ |
15 my %asked = map { $_ => $_ } @ARGV;
18 next unless (/^(v(\d+)\.(\d+)(?:\.(\d+))?(?:-rc(\d+))?)$/);
19 # $1 = tag == v$2.$3(.$4)?(-rc$5)?
21 if (exists $asked{$1}) {
23 } elsif (defined $5) {
27 # not worth showing breakdown during v0.99 period
28 next unless ($1 eq "v0.99");
30 # not worth showing breakdown before v1.4.0
31 next if ($3 < 4 && $4);
33 push @version, [$1, $2, $3, $4, $5];
36 $a->[1] <=> $b->[1] ||
37 $a->[2] <=> $b->[2] ||
38 $a->[3] <=> $b->[3] ||
39 ( (defined $a->[4] && defined $b->[4])
42 ? -1 : 1 ) ); } @version) {
48 commitcnt
=$
(git rev-list
--no-merges "$new" |
wc -l)
49 git shortlog
-s -n "$new" |
50 sed -e 's/^[ 0-9]*//' |
54 comm -13 /var
/tmp
/old
/var
/tmp
/new
>"/var/tmp/cont-$new"
55 i
=$
(git shortlog
-s -n "$old..$new" |
56 sed -e 's/^[ 0-9]*//' |
58 cc
=$
(( $commitcnt - $ocommitcnt ))
60 i
=$
(wc -l </var
/tmp
/new
)
61 cat /var
/tmp
/new
>"/var/tmp/cont-$new"
62 cc
=$
(( $commitcnt + 0 ))
65 mv /var
/tmp
/new
/var
/tmp
/old
66 n
=$
(wc -l <"/var/tmp/cont-$new")
67 c
=$
(wc -l <"/var/tmp/old")
68 t
=$
(git show
-s --format="%ci" "$old^0" |
sed -e "s/ .*//")
70 test -z "$head" ||
echo "$head"
71 printf "$fmt" $new $n $i $c $cc $commitcnt $t