浏览代码

Add git statistics generation to release-tool.pl

jcamins
Jared Camins-Esakov 9 年前
父节点
当前提交
e519c1466f
  1. 23
      gitdm.config
  2. 19
      gitdm/aliases
  3. 33
      gitdm/domain-map
  4. 44
      release-tool.pl

23
gitdm.config

@ -0,0 +1,23 @@
#
# This is a sample gitdm configuration file.
#
#
# EmailAliases lets us cope with developers who use more
# than one address.
#
EmailAliases gitdm/aliases
#
# EmailMap does the main work of mapping addresses onto
# employers.
#
EmailMap gitdm/domain-map
#
# Use GroupMap to map a file full of addresses to the
# same employer
#
# GroupMap sample-config/illuminati The Illuminati
#

19
gitdm/aliases

@ -0,0 +1,19 @@
corbet@eklektix.com corbet@lwn.net
katrin.fischer.bsz-bw.de katrin.fischer@bsz-bw.de
chris.nighswonger@gmail.com cnighswonger@foundations.edu
tipaul paul.poulain@biblibre.com
rangi chris@katipo.co.nz
finlayt finlay@katipo.co.nz
paul@koha-fr.org paul.poulain@biblibre.com
hdl henridamien.laurent@biblibre.com
joshferraro jmf@liblime.com
rch rch@liblime.com
toins toins@biblibre.com
kados jmf@liblime.com
oleonard oleonard@myacpl.org
connor.dewar@gmail.com connor.dewar@catalystacademy.net.nz
sam-sanders@live.com sam-sanders@catalystacademy.net.nz
jorgia_m_kelsey@hotmail.com jorgia@catalystacademy.net.nz
bart.tj@gmail.com bart@catalystacademy.net.nz
kate.h@paradise.net.nz kate@catalystacademy.net.nz
reason.koan@gmail.com jono@catalystacademy.ne.nz

33
gitdm/domain-map

@ -0,0 +1,33 @@
#
# Here is a set of mappings of domain names onto employer names.
#
ptfs.com PTFS
ptfs-europe.com PTFS-Europe
catalyst.net.nz Catalyst
biblibre.com Biblibre
bywatersolutions.com ByWater-Solutions
tamil.fr Tamil
bigballofwax.co.nz BigBallOfWax
katipo.co.nz Katipo
liblime.com Liblime
foundations.edu Foundations
myacpl.org ACPL
web.de BSZ-BW
bsz-bw.de BSZ-BW
nekls.org NEKLS
enger.priv.no Libriotech
kohaaloha.com KohaAloha
rijksmuseum.nl Rijksmuseum
esilibrary.com Equinox
libeo.com Libeo
masmedios.com MASmedios
cpbibliography.com C & P Bibliography
phonecoop.coop Software.coop
uttyler.edu UT Tyler
sys-tech.net Libeo
rot13.org rot13.org
xercode.es Xercode
catalystacademy.net.nz Catalyst Open Source Academy
cilea.it Cilea
anantcorp.com Anant Corp
mvwsd.org Mountain View Whisman School District

44
release-tool.pl

@ -80,16 +80,19 @@ my %defaults = (
quiet => 0,
rnotes => '',
sign => 0,
since => '',
'skip-deb' => 0,
'skip-install' => 0,
'skip-marc21' => 0,
'skip-normarc' => 0,
'skip-pbuilder' => 0,
'skip-rnotes' => 0,
'skip-stats' => 0,
'skip-tests' => 0,
'skip-tgz' => 0,
'skip-unimarc' => 0,
'skip-webinstall' => 0,
stats => '',
tag => 0,
tarball => '',
'tgz-install-dir' => '',
@ -217,6 +220,9 @@ Updating the pbuilder environment
=item B<rnotes>
Generating release notes
=item B<stats>
Generating git statistics
=back
=back
@ -243,6 +249,11 @@ kohaversion.pl
Automatically include the git commit id and timestamp in the package version
=item B<--since>
Tag or commit from which to generate release notes and statistics. Defaults
to last tag on branch.
=back
=head2 Execution options
@ -299,6 +310,12 @@ File to store error information in. Defaults to [build-result]/errors.log
The name of the release notes file to generate or use (see I<--use-dist-rnotes>).
Defaults to [build-result]/release_notes.txt
=item B<--stats>
The base name of the files into which statistics should be placed.
Defaults to [build-result]/statistics (statistics will be generated
in .txt and .html format)
=item B<--tarball, -t>
The name of the tarball file to generate. Defaults to
@ -348,12 +365,12 @@ my $options = GetOptions(
'skip-install', 'skip-marc21',
'skip-unimarc', 'skip-normarc',
'skip-webinstall', 'skip-pbuilder',
'skip-rnotes',
'skip-rnotes', 'skip-stats',
# Source description options
'version=s', 'autoversion|a',
'kohaclone|k=s',
'branch=s',
'branch=s', 'since=s',
# Execution options
'database=s',
@ -365,6 +382,7 @@ my $options = GetOptions(
# Output options
'build-result|b=s', 'errorlog=s',
'tarball|t=s', 'rnotes|r=s',
'stats=s',
# Announcement options
'email-file=s',
@ -455,6 +473,13 @@ set_default(
set_default( 'rnotes', build_result('release_notes.txt') );
set_default( 'stats', build_result('statistics') );
my $lasttag = `git describe --abbrev=0`;
chomp $lasttag;
set_default( 'since', $lasttag );
set_default( 'errorlog', build_result('errors.log') );
set_default( 'tgz-install-dir', build_result('fresh') );
@ -579,12 +604,25 @@ unless ( $config->param('skip-rnotes') || $config->param('use-dist-rnotes') ) {
shell_task(
"Generating release notes",
"$reltools/get_bugs.pl -r "
. $config->param('rnotes') . " -v "
. $config->param('rnotes') . " -t "
. $config->param('since') . " -v "
. $config->param('version')
. " --verbose 2>&1"
);
}
system('which gitdm 2>&1 > /dev/null');
$config->param('skip-stats', 1) if $?;
unless ( $config->param('skip-stats') ) {
shell_task(
"Generating statistics",
"git log -p -M " . $config->param('since')
. "..HEAD | gitdm -b $reltools -c $reltools/gitdm.config -u -s -a -o "
. $config->param('stats') . ".txt -h "
. $config->param('stats') . ".html 2>&1"
);
}
unless ( $config->param('skip-deb') || $config->param('skip-install') ) {
shell_task( "Installing package...",
"sudo dpkg -i " . $config->param('package') . " 2>&1" );

正在加载...
取消
保存