From d855aa85e63bc76ec272d4967116f10667f61698 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 00:12:38 +0200 Subject: reproducible: build: refactor: add a init() function to gather initialization of the build environment --- bin/reproducible_build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/reproducible_build.sh') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 22b35312..e2d134c0 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -171,10 +171,9 @@ choose_package () { fi } +init() { if [ $SAVE_ARTIFACTS -eq 1 ] ; then AANOUNCE=" Artifacts will be preserved." - else - AANOUNCE="" fi create_results_dirs echo "=============================================================================" @@ -182,6 +181,7 @@ choose_package () { echo "=============================================================================" # mark build attempt sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO schedule (package_id, date_scheduled, date_build_started) VALUES ('$SRCPKGID', '$SCHEDULED_DATE', '$DATE');" +} TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) TMPCFG=$(mktemp -t pbuilderrc_XXXX) @@ -197,6 +197,9 @@ START=$(date +'%s') choose_package +init + + echo "Starting to build ${SRCPACKAGE}/${SUITE} on $DATE" | tee ${RBUILDLOG} echo "The jenkins build log is/was available at $BUILD_URL/console" | tee -a ${RBUILDLOG} -- cgit v1.2.3-70-g09d2