summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2017-04-15 18:56:18 +0200
committerHolger Levsen <holger@layer-acht.org>2017-04-15 18:56:18 +0200
commit3ef9204de35f97d430f7f92b5c8e1845073de097 (patch)
treedfe1b517f7d9fb2883a2279680533d614ad00199
parent7f177998acc6d61e9637f563b72fa07f98ae7e6c (diff)
downloadjenkins.debian.net-3ef9204de35f97d430f7f92b5c8e1845073de097.tar.xz
reproducible Debian: fix latest logic
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-xbin/reproducible_build_service.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_build_service.sh b/bin/reproducible_build_service.sh
index 6b24ceaa..14477cc2 100755
--- a/bin/reproducible_build_service.sh
+++ b/bin/reproducible_build_service.sh
@@ -19,13 +19,13 @@ set -x
/bin/sleep $(echo "scale=1 ; $(shuf -i 1-230 -n 1)/10" | bc )
BUILD_BASE=/var/lib/jenkins/userContent/reproducible/debian/build_service/$1
-OLD_ID=$(ls -1rt $BUILD_BASE|grep -v latest|tail -1)
+OLD_ID=$(ls -1rt $BUILD_BASE|grep -v latest|head -1)
let BUILD_ID=OLD_ID+1
mkdir -p $BUILD_BASE/$BUILD_ID
-ln -sf $BUILD_BASE/$BUILD_ID $BUILD_BASE/latest
+(cd $BUILD_BASE ; ln -sf $BUILD_ID latest)
export BUILD_URL=https://jenkins.debian.net/userContent/build_service/$1
-export BUILD_ID
+export BUILD_ID=$BUILD_ID
export JOB_NAME="reproducible_builder_$1"
case $1 in