summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-07 19:35:54 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 18:03:00 +0200
commit8aab55cc86193b2d8c45707ce86d7cc147b94cc6 (patch)
treee44a3cd17b9f813b6b6858b891693e515e959992
parent73b55a1188254cdfb1f5c8257e70a739266e1fbc (diff)
downloadjenkins.debian.net-8aab55cc86193b2d8c45707ce86d7cc147b94cc6.tar.xz
reproducible: build: refactor: save the correct version to the DB
-rwxr-xr-xbin/reproducible_build.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 29953733..b4628019 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