From 182ee13f4c919683d3c59bf59fa55091376e8d61 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 27 Mar 2015 20:56:12 +0100 Subject: 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 d00b2adf..891f0968 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="" -- cgit v1.2.3-70-g09d2