From 23931461adc32f137b88f013253f645a328c93ab Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 1 Mar 2022 22:44:22 +0000 Subject: [PATCH 1/4] Use releasetag script --- publish/promptingpublish.groovy | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index d0f6564..053004e 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -52,19 +52,17 @@ pipeline { stage('Identify software release to publish') { steps { script { + rt = load("${autobuilder.commonscripts()}/release/tag.groovy") gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy") def allreleases = gh.gettaglist(SOURCEDIR) def releases = new ArrayList() for (release in allreleases) { def boolean canadd = true - if (FILTER_REDUNDANT_RELEASES && ( - release.toLowerCase().startsWith("superceded") || - release.toLowerCase().startsWith("superseded") || - release.toLowerCase().startsWith("erroneous") || - release.toLowerCase().startsWith("faulty") || - release.toLowerCase().startsWith("ignore") || - release.toLowerCase().startsWith("inmainline"))) { - canadd = false + if (FILTER_REDUNDANT_RELEASES) { + def results = rt.startswithspecialprefix(release) + if (results.prefixfound) { + canadd = false + } } if (FILTER_LONGNAME_RELEASES && release.findAll(/[a-zA-Z]/)) { canadd = false From db92ee3e90180bef27289b57e025e79d650ae208 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 1 Mar 2022 23:05:39 +0000 Subject: [PATCH 2/4] Debug release filtering --- publish/promptingpublish.groovy | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 053004e..f6002e5 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -62,10 +62,14 @@ pipeline { def results = rt.startswithspecialprefix(release) if (results.prefixfound) { canadd = false + echo "Found prefix in ${release}" } } - if (FILTER_LONGNAME_RELEASES && release.findAll(/[a-zA-Z]/)) { - canadd = false + if (FILTER_LONGNAME_RELEASES) { + if (release.findAll(/[a-zA-Z]/)) { + canadd = false + echo "${release} is a long name" + } } if (canadd) { echo("Showing release: ${release}") From 3730461511700e692f81f2fb780398254307a71c Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 1 Mar 2022 23:13:05 +0000 Subject: [PATCH 3/4] Debug release filtering --- publish/promptingpublish.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index f6002e5..7430a3c 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -58,14 +58,14 @@ pipeline { def releases = new ArrayList() for (release in allreleases) { def boolean canadd = true - if (FILTER_REDUNDANT_RELEASES) { + if (FILTER_REDUNDANT_RELEASES == 'true') { def results = rt.startswithspecialprefix(release) if (results.prefixfound) { canadd = false echo "Found prefix in ${release}" } } - if (FILTER_LONGNAME_RELEASES) { + if (FILTER_LONGNAME_RELEASES == 'true') { if (release.findAll(/[a-zA-Z]/)) { canadd = false echo "${release} is a long name" From b70fe5f7bd258ba0c3be2eaeebb12403e01c460b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Tue, 1 Mar 2022 23:17:58 +0000 Subject: [PATCH 4/4] Remove debug release filtering --- publish/promptingpublish.groovy | 2 -- 1 file changed, 2 deletions(-) diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index 7430a3c..49d9421 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -62,13 +62,11 @@ pipeline { def results = rt.startswithspecialprefix(release) if (results.prefixfound) { canadd = false - echo "Found prefix in ${release}" } } if (FILTER_LONGNAME_RELEASES == 'true') { if (release.findAll(/[a-zA-Z]/)) { canadd = false - echo "${release} is a long name" } } if (canadd) {