Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
steelhead31 committed Oct 9, 2024
1 parent 82ad6f5 commit 0e51340
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions linux/sfr.dev/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ pipeline {
error("Unsupported dist: ${PDIST}")
}
DISTS_TO_BUILD.each { DistArrayElement ->
// Parse Version Numbers For Spec File Elements
def versionPattern = /^(\d+)(?:\.(\d+))?_(.+)$/
def versparser = (PVERS =~ versionPattern)

if (versparser.matches()) {
def firstElement = versparser[0][1].toInteger()
def secondElement = versparser[0][2] ?: null
def thirdElement = versparser[0][3]

echo "First Element: ${firstElement}"
echo "Second Element: ${secondElement != null ? secondElement : 'null'}"
echo "Third Element: ${thirdElement}"
} else {
error("Version string format is invalid: ${PVERS}")
}
// Usage: ./generate_spec_file.sh DISTRIBUTION PACKAGE_TYPE VERSION ARCH
def speccmd = "./generate_spec_file.sh ${DistArrayElement} ${PTYPE} ${PVERS} ${PARCH}"
echo "Spec Command : ${speccmd}"
Expand Down

0 comments on commit 0e51340

Please sign in to comment.