diff --git a/publish/promptingpublish.groovy b/publish/promptingpublish.groovy index d0f6564..49d9421 100644 --- a/publish/promptingpublish.groovy +++ b/publish/promptingpublish.groovy @@ -52,22 +52,22 @@ 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 == 'true') { + def results = rt.startswithspecialprefix(release) + if (results.prefixfound) { + canadd = false + } } - if (FILTER_LONGNAME_RELEASES && release.findAll(/[a-zA-Z]/)) { - canadd = false + if (FILTER_LONGNAME_RELEASES == 'true') { + if (release.findAll(/[a-zA-Z]/)) { + canadd = false + } } if (canadd) { echo("Showing release: ${release}")