From 5db5ab65a8987cc3c51a78336560a6e986d864e1 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 18 Feb 2015 13:12:02 +0100 Subject: reproducible: check whether assumptions are true --- bin/reproducible_html_graphs.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index e11e42c4..bb364d28 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -59,11 +59,22 @@ if [ -z $RESULT ] ; then # force regeneration of the image touch -d "$DATE 00:00" ${TABLE[$i]}.png done + # # gather notes stats - # FIXME: hard-coding another job path is meh - NOTES=$(grep -c -v "^ " /var/lib/jenkins/jobs/reproducible_html_notes/workspace/packages.yml) + # + NOTES_GIT_PATH="/var/lib/jenkins/jobs/reproducible_html_notes/workspace" + if [ ! -d ${NOTES_GIT_PATH} ] ; then + echo "Warning: ${NOTES_GIT_PATH} does not exist, has the job been renamed???" + echo "Please investigate and fix!" + exit 1 + elif [ ! -f ${NOTES_GIT_PATH}/packages.yaml ] || [ ! -f ${NOTES_GIT_PATH}/issues.yaml ] ; then + echo "Warning: ${NOTES_GIT_PATH}/packages.yaml or issues.yaml does not exist, something has changed in notes.git it seems." + echo "Please investigate and fix!" + exit 1 + fi + NOTES=$(grep -c -v "^ " ${NOTES_GIT_PATH}/packages.yml) sqlite3 -init ${INIT} ${PACKAGES_DB} "INSERT INTO ${TABLE[4]} VALUES (\"$DATE\", \"$NOTES\")" - ISSUES=$(grep -c -v "^ " /var/lib/jenkins/jobs/reproducible_html_notes/workspace/issues.yml) + ISSUES=$(grep -c -v "^ " ${NOTES_GIT_PATH}/issues.yml) sqlite3 -init ${INIT} ${PACKAGES_DB} "INSERT INTO ${TABLE[5]} VALUES (\"$DATE\", \"$ISSUES\")" fi -- cgit v1.2.3-70-g09d2