From 785806d6ac1e56e75d955a1c760d8a01034d045e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 4 Nov 2013 19:02:55 +0000 Subject: [PATCH] setup old identifier before values get changed --- utils/jenkins-build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/jenkins-build.sh b/utils/jenkins-build.sh index 375d6b120..9d236a153 100755 --- a/utils/jenkins-build.sh +++ b/utils/jenkins-build.sh @@ -33,11 +33,19 @@ # BUILD_JS is the javascript type (json or jsoff) # BUILD_NUMBER is the CI build number +##### + +# set defaults - this is not retrivable from the jenkins environment +OLD_ARTIFACT_COUNT=25 + ################# Parameter and environment setup ##################### #identifier for this specific build IDENTIFIER="$CC-${BUILD_JS}-${BUILD_NUMBER}" +# Identifier for build which will be cleaned +OLD_IDENTIFIER="$CC-${BUILD_JS}-$((BUILD_NUMBER - ${OLD_ARTIFACT_COUNT}))" + # default atari architecture - bletch ATARIARCH=68020-60 @@ -369,7 +377,6 @@ ssh netsurf@ci.netsurf-browser.org "rm -f ${DESTDIR}/LATEST && echo "${NEW_ARTIF ############ Package artifact cleanup ################ -OLD_ARTIFACT_COUNT=25 -OLD_ARTIFACT_TARGET="NetSurf-$CC-${BUILD_JS}-$((BUILD_NUMBER - ${OLD_ARTIFACT_COUNT}))" +OLD_ARTIFACT_TARGET="NetSurf-${OLD_IDENTIFIER}${PKG_SFX}" ssh netsurf@ci.netsurf-browser.org "rm -f ${DESTDIR}/${OLD_ARTIFACT_TARGET}"