From 2a137e78212a2706b41b48927a80f88399a95449 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 9 Jul 2013 16:19:03 -0400 Subject: [PATCH] Split up generation into 2 scripts Change-Id: Ib9bd1039922f5338fdea2348d9f221709c2fafde Reviewed-on: https://review.openstack.org/36336 Approved: Russell Bryant Reviewed-by: Russell Bryant Tested-by: Jenkins --- .gitignore | 1 + genresults.sh => genresults-openreviews.sh | 11 ++++----- genresults-reviewers.sh | 26 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 7 deletions(-) rename genresults.sh => genresults-openreviews.sh (77%) create mode 100755 genresults-reviewers.sh diff --git a/.gitignore b/.gitignore index a8ba905..a09a161 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc *.pickle +results diff --git a/genresults.sh b/genresults-openreviews.sh similarity index 77% rename from genresults.sh rename to genresults-openreviews.sh index bbd14fa..07f3cde 100755 --- a/genresults.sh +++ b/genresults-openreviews.sh @@ -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 "" >> 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 diff --git a/genresults-reviewers.sh b/genresults-reviewers.sh new file mode 100755 index 0000000..20c12c1 --- /dev/null +++ b/genresults-reviewers.sh @@ -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