340
}
341
343
>
344
>
foundEndVer := false
345
>
346
>
for _, version := range versions {
347
>
semVer, err := semver.ParseTolerant(version)
348
>
if err != nil {
349
logger.Warn(fmt.Sprintf("Input '%s' is not a valid semver", version))
350
continue
351
}
352
353
>
if startVersionExclusive.Compare(semVer) >= 0 {
updatetask.go
354
continue
355
}
356
357
>
if endVersionInclusive != nil && endVersionInclusive.Compare(semVer) < 0 {
updatetask.go
358
continue
359
}
360
361
>
if endVersionInclusive != nil && endVersionInclusive.Compare(semVer) == 0 {
updatetask.go
362
foundEndVer = true
363
}
364
366
}
367
368
>
if endVersionInclusive != nil && !foundEndVer {
updatetask.go
369
return nil, fmt.Errorf("end version '%s' specified but not found. existing versions: %s", endVerIncl, versions)
370
}