[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible debian: be sure to have an empty variable at the start of the loop...

Holger Levsen holger at layer-acht.org
Thu Jan 19 12:55:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 7745ba7928d7c757bcb241fac6da7a1fa75c969c
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Jan 19 13:53:53 2017 +0100

    reproducible debian: be sure to have an empty variable at the start of the loop...
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_html_dashboard.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh
index d403111..4936adf 100755
--- a/bin/reproducible_html_dashboard.sh
+++ b/bin/reproducible_html_dashboard.sh
@@ -302,9 +302,10 @@ _average_builds_per_day() {
 	for ARCH in ${ARCHS} ; do
 		local OLDEST_BUILD="$(query_db "SELECT build_date FROM stats_build WHERE architecture='$ARCH' ORDER BY build_date ASC LIMIT 1")"
 		local DAY_DIFFS="$(( ($(date -d "$DATE" +%s) - $(date -d "$OLDEST_BUILD" +%s)) / (60*60*24) ))"
+		local DISCLAIMER=""
 		if [ $DAY_DIFFS -lt $TIMESPAN_RAW ]; then
 			# this is a new architecture, there are fewer days to compare to.
-			local DISCLAIMER=" <span style=\"font-size: 0.8em;\">(in the last $DAY_DIFFS days)</span>"
+			DISCLAIMER=" <span style=\"font-size: 0.8em;\">(in the last $DAY_DIFFS days)</span>"
 			TIMESPAN_RAW=$DAY_DIFF
 		fi
 		if [ $DAY_DIFFS -ge $MIN_DAYS ]; then
@@ -319,7 +320,7 @@ _average_builds_per_day() {
 			# very new arch with too few resulsts to care about stats
 			RESULT=" "
 		fi
-		write_page "<td>${RESULT}${DISCLAIMER:-}</td>"
+		write_page "<td>${RESULT}${DISCLAIMER}</td>"
 	done
 	write_page "</tr>"
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list