[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: refactor, save_artifacts is always an integer

Holger Levsen holger at moszumanska.debian.org
Fri Mar 27 19:56:34 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 182ee13f4c919683d3c59bf59fa55091376e8d61
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Mar 27 20:56:12 2015 +0100

    reproducible: refactor, save_artifacts is always an integer
---
 bin/reproducible_build.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index d00b2ad..891f096 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -24,7 +24,7 @@ create_results_dirs() {
 }
 
 cleanup_all() {
-	if [ "$SAVE_ARTIFACTS" = "1" ] ; then
+	if [ $SAVE_ARTIFACTS -eq 1 ] ; then
 		local random=$(head /dev/urandom | tr -cd '[:alnum:]'| head -c5)
 		local ARTIFACTS="artifacts/r00t-me/${SRCPACKAGE}_${SUITE}_tmp-${random}"
 		mkdir -p /var/lib/jenkins/userContent/$ARTIFACTS
@@ -36,7 +36,7 @@ cleanup_all() {
 		echo "https://reproducible.debian.net/$ARTIFACTS" | tee -a ${RBUILDLOG}
 		echo | tee -a ${RBUILDLOG}
 		kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "https://reproducible.debian.net/$ARTIFACTS/ published" || true # don't fail the whole job
-	elif [ "$SAVE_ARTIFACTS" = "2" ] ; then
+	elif [ $SAVE_ARTIFACTS -eq 2 ] ; then
 		echo "No artifacts were saved for this build." | tee -a ${RBUILDLOG}
 		kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "Check $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log to find out why no artifacts were saved." || true # don't fail the whole job
 	fi
@@ -168,7 +168,7 @@ else
 	SRCPACKAGE=$(echo $RESULT|cut -d "|" -f3)
 	SCHEDULED_DATE=$(echo $RESULT|cut -d "|" -f4)
 	SAVE_ARTIFACTS=$(echo $RESULT|cut -d "|" -f5)
-	if [ "$SAVE_ARTIFACTS" = "1" ] ; then
+	if [ $SAVE_ARTIFACTS -eq 1 ] ; then
 		AANOUNCE=" Artifacts will be preserved."
 	else
 		AANOUNCE=""

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