1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-30 05:59:39 +02:00

fix(versioning): ensure that version is not empty (#4173)

Co-authored-by: tiloKo <70266685+tiloKo@users.noreply.github.com>
This commit is contained in:
Oliver Nocon 2024-04-29 08:19:52 +02:00 committed by GitHub
parent b18f8578d0
commit 7d9fc6aee4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,6 +142,9 @@ func runArtifactPrepareVersion(config *artifactPrepareVersionOptions, telemetryD
if err != nil {
log.SetErrorCategory(log.ErrorConfiguration)
return errors.Wrap(err, "failed to retrieve version")
} else if len(version) == 0 {
log.SetErrorCategory(log.ErrorConfiguration)
return fmt.Errorf("version is empty - please check versioning configuration")
}
log.Entry().Infof("Version before automatic versioning: %v", version)