feat(debian): possibilité d'interpreter ou non la version attendue comme un patron
This commit is contained in:
parent
cf66210f4e
commit
9cf903ce41
|
@ -2,6 +2,7 @@ def waitForRepoPackage(String packageName, Map params = [:]) {
|
|||
def expectedVersion = params.expectedVersion ? params.expectedVersion : null
|
||||
def delay = params.delay ? params.delay : 30
|
||||
def waitTimeout = params.timeout ? params.timeout : 2400
|
||||
def asPattern = params.containsKey("asPattern") ? params.asPattern : true
|
||||
|
||||
def message = "Waiting for package '${packageName}'"
|
||||
if (expectedVersion != null) {
|
||||
|
@ -28,7 +29,7 @@ def waitForRepoPackage(String packageName, Map params = [:]) {
|
|||
}
|
||||
|
||||
def versionFound = packages.find {
|
||||
def matches = it['version'] =~ expectedVersion
|
||||
def matches = asPattern ? it['version'] =~ expectedVersion : it['version'] == expectedVersion
|
||||
println("Comparing expected version '${expectedVersion}' to '${it['version']}': ${matches}")
|
||||
return matches
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue