Split up generation into 2 scripts

Change-Id: Ib9bd1039922f5338fdea2348d9f221709c2fafde
Reviewed-on: https://review.openstack.org/36336
Approved: Russell Bryant <rbryant@redhat.com>
Reviewed-by: Russell Bryant <rbryant@redhat.com>
Tested-by: Jenkins
This commit is contained in:
Russell Bryant 2013-07-09 16:19:03 -04:00 committed by Jenkins
parent 8dca8dc6fc
commit 2a137e7821
3 changed files with 31 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.pyc
*.pickle
results

View File

@ -10,15 +10,14 @@ fi
mkdir -p results
rm -f results/*
rm -f results/*-openreviews*
rm -f results/*-openapproved*
for project in ${projects} ; do
project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
(date -u && echo && ./openreviews.py -p ${project}) > results/${project_base}-openreviews.txt
./openreviews.py -p ${project} --html > results/${project_base}-openreviews.html
for time in 30 90 180 ; do
(date -u && echo && ./reviewers.py -p ${project} -d ${time}) > results/${project_base}-reviewers-${time}.txt
done
(date -u && echo && ./openapproved.py -p ${project}) > results/${project_base}-openapproved.txt
done
if [ "${all}" = "1" ] ; then
@ -34,7 +33,5 @@ if [ "${all}" = "1" ] ; then
echo "</html>" >> results/all-openreviews.html.tmp
mv results/all-openreviews.html.tmp results/all-openreviews.html
for time in 30 90 180 ; do
(date -u && echo && ./reviewers.py -a -d ${time}) > results/all-reviewers-${time}.txt
done
(date -u && echo && ./openapproved.py -a) > results/all-openapproved.txt
fi

26
genresults-reviewers.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
projects=$1
all=0
if [ "$projects" = "" ] ; then
projects=projects/*.json
all=1
fi
mkdir -p results
rm -f results/*-reviewers-*
for project in ${projects} ; do
project_base=$(basename $(echo ${project} | cut -f1 -d'.'))
for time in 30 90 180 ; do
(date -u && echo && ./reviewers.py -p ${project} -d ${time}) > results/${project_base}-reviewers-${time}.txt
done
done
if [ "${all}" = "1" ] ; then
for time in 30 90 180 ; do
(date -u && echo && ./reviewers.py -a -d ${time}) > results/all-reviewers-${time}.txt
done
fi