Need the dash?

This commit is contained in:
Jim Nicholson 2024-02-26 15:27:00 -08:00
parent ddf1534abd
commit b359133990

View File

@ -45,7 +45,7 @@ Map call(Map config = [:], Map queryParams = [:]) {
/* groovylint-disable-next-line Instanceof */
if (latest.version instanceof net.sf.json.JSONNull && latest.name) {
echo 'Info: Search result version field was null, looking in name field for a version'
java.util.regex.Matcher match = (latest.name =~ /(?<=-)(\d+\.\d+\.\d+)(?=[\.].*)/)
java.util.regex.Matcher match = (latest.name =~ /(?<=-)(\d+\.\d+\.\d+)(?=[\.-].*)/)
if (!match) {
echo "Error: Match: ${match}"
error("Regular expression match failed for latest.name: ${latest.name}")