From 62042a28bc6c4ad46154de98f95c682ffc3ed30a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 11 Dec 2015 22:36:39 +0100 Subject: reproducible: force graphs to be regenerated each midnight, time+logic is hard --- bin/reproducible_html_dashboard.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh index ae174dd5..490bd5ba 100755 --- a/bin/reproducible_html_dashboard.sh +++ b/bin/reproducible_html_dashboard.sh @@ -17,8 +17,8 @@ common_init "$@" # we only do stats up until yesterday... we also could do today too but not update the db yet... DATE=$(date -d "1 day ago" '+%Y-%m-%d') FORCE_DATE=$(date -d "3 days ago" '+%Y-%m-%d') -OLD_DUMMY_FILE=$(mktemp -t reproducible-dashboard-XXXXXXXX) -touch -d "$DATE 00:00 UTC" $OLD_DUMMY_FILE +DUMMY_FILE=$(mktemp -t reproducible-dashboard-XXXXXXXX) +touch -d "$(date '+%Y-%m-%d') 00:00 UTC" $DUMMY_FILE NOTES_GIT_PATH="/var/lib/jenkins/jobs/reproducible_html_notes/workspace" # variables related to the stats we update @@ -388,7 +388,7 @@ create_suite_arch_stats_page() { write_page " \"${MAINLABEL[0]}\"" for i in 0 2 ; do # recreate png once a day - if [ ! -f $BASE/$SUITE/$ARCH/${TABLE[$i]}.png ] || [ $OLD_DUMMY_FILE -nt $BASE/$SUITE/$ARCH/${TABLE[$i]}.png ] ; then + if [ ! -f $BASE/$SUITE/$ARCH/${TABLE[$i]}.png ] || [ $DUMMY_FILE -ot $BASE/$SUITE/$ARCH/${TABLE[$i]}.png ] ; then create_png_from_table $i $SUITE/$ARCH/${TABLE[$i]}.png fi done @@ -463,7 +463,7 @@ create_dashboard_page() { for i in 8 9 3 7 4 5 ; do write_page " \"${MAINLABEL[$i]}\"" # redo pngs once a day - if [ ! -f $BASE/${TABLE[$i]}.png ] || [ $OLD_DUMMY_FILE -nt $BASE/${TABLE[$i]}.png ] ; then + if [ ! -f $BASE/${TABLE[$i]}.png ] || [ $DUMMY_FILE -ot $BASE/${TABLE[$i]}.png ] ; then create_png_from_table $i ${TABLE[$i]}.png fi done @@ -475,7 +475,7 @@ create_dashboard_page() { write_page " \"${MAINLABEL[$i]}\"" # redo arch specific pngs once a day for ARCH in ${ARCHS} ; do - if [ ! -f $BASE/${TABLE[1]}_$ARCH.png ] || [ $OLD_DUMMY_FILE -nt $BASE/${TABLE[1]}_$ARCH.png ] ; then + if [ ! -f $BASE/${TABLE[1]}_$ARCH.png ] || [ $DUMMY_FILE -ot $BASE/${TABLE[1]}_$ARCH.png ] ; then create_png_from_table 1 ${TABLE[1]}_$ARCH.png fi done @@ -526,4 +526,4 @@ done ARCH="amd64" SUITE="unstable" create_dashboard_page -rm -f $OLD_DUMMY_FILE >/dev/null +rm -f $DUMMY_FILE >/dev/null -- cgit v1.2.3-70-g09d2