[Qa-jenkins-scm] [jenkins.debian.net] 04/09: reproducible: build: refactor: save the correct version to the DB

Holger Levsen holger at moszumanska.debian.org
Sat Apr 18 16:06:45 UTC 2015


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 8aab55cc86193b2d8c45707ce86d7cc147b94cc6
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Tue Apr 7 19:35:54 2015 +0200

    reproducible: build: refactor: save the correct version to the DB
---
 bin/reproducible_build.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 2995373..b462801 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -78,7 +78,10 @@ calculate_build_duration() {
 update_db_and_html() {
 	# everything passed at this function is saved as a status of this package in the db
 	local STATUS="$@"
-	sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', 'None', '$STATUS', '$DATE', '$DURATION')"
+	if [ -z "$VERSION" ] ; then
+		VERSION="None"
+	fi
+	sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO results (package_id, version, status, build_date, build_duration) VALUES ('${SRCPKGID}', '$VERSION', '$STATUS', '$DATE', '$DURATION')"
 	if [ ! -z "$DURATION" ] ; then  # this happens when not 404 and not_for_us
 		sqlite3 -init $INIT ${PACKAGES_DB} "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration) VALUES ('${SRCPACKAGE}', '${VERSION}', '${SUITE}', '${ARCH}', '${STATUS}', '${DATE}', '${DURATION}')"
 	fi

-- 
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