From 55262543d73eea07a265a815db213e360a8a9525 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 30 Nov 2018 17:41:40 +0000 Subject: [PATCH] Check for changes occurring --- release/do.groovy | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/release/do.groovy b/release/do.groovy index 5d4f2e9..7b7c07c 100644 --- a/release/do.groovy +++ b/release/do.groovy @@ -118,15 +118,14 @@ def boolean checkforchange(buildmeta, previousreleasemeta) { } def ArrayList maketaglist(String buildstamp, String otherreleasetags) { - ArrayList taglist = new ArrayList() - taglist.add(buildstamp.trim()) + def ArrayList taglist = new ArrayList() + taglist.add(buildstamp) - echo "Taglist: ${taglist} size: ${taglist.size()}" - - ArrayList othertaglist = otherreleasetags.trim().split(',') - echo "othertaglist: ${othertaglist} size: ${othertaglist.size()}" + def ArrayList othertaglist = otherreleasetags.split(',') for (othertagitem in othertaglist) { - taglist.add(othertagitem.trim()) + if (othertagitem?.trim()) { + taglist.add(othertagitem.trim()) + } } echo "Taglist: ${taglist} size: ${taglist.size()}" return taglist @@ -181,7 +180,7 @@ def releasegitpush(String dryrunpush ) { def gitrelease(buildmeta, previousreleasemeta, String releaserepo, String otherreleasetags, String dryrunpush) { summaryappend(" Git operations: ") - def String buildstamp = buildmeta.buildstampinfo.buildstamp.trim() + def String buildstamp = buildmeta.buildstampinfo.buildstamp dir(releaserepo) { def String precommitshacode = sh(script: "git rev-parse --verify HEAD", returnStdout: true).trim() echo "Pre commit sha code: ${precommitshacode}"