docs: use same style log messages [ci skip]

This commit is contained in:
decentral1se 2021-09-29 22:36:50 +02:00
parent 1c5d6d6357
commit 10b15d65b4
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -116,7 +116,7 @@ or a rollback of an app.
mainApp := getMainApp(recipe) mainApp := getMainApp(recipe)
mainAppVersion := imagesTmp[mainApp] mainAppVersion := imagesTmp[mainApp]
if mainAppVersion == "" { if mainAppVersion == "" {
logrus.Fatal("Main app's version is empty.") logrus.Fatal("main app version is empty?")
} }
if tagstring != "" { if tagstring != "" {
@ -169,7 +169,7 @@ or a rollback of an app.
if tagstring != "" { if tagstring != "" {
if bumpType > 0 { if bumpType > 0 {
logrus.Warn("user specified a version number and --major/--minor/--patch at the same time! Using version number.") logrus.Warn("user specified a version number and --major/--minor/--patch at the same time! using version number...")
} }
tag, err := tagcmp.Parse(tagstring) tag, err := tagcmp.Parse(tagstring)
if err != nil { if err != nil {
@ -185,19 +185,19 @@ or a rollback of an app.
} }
tagstring = fmt.Sprintf("%s+%s", tag.String(), mainAppVersion) tagstring = fmt.Sprintf("%s+%s", tag.String(), mainAppVersion)
if Dry { if Dry {
logrus.Info(fmt.Sprintf("Dry run only. NOT creating tag %s at %s", tagstring, head.Hash())) logrus.Info(fmt.Sprintf("dry run only: NOT creating tag %s at %s", tagstring, head.Hash()))
return nil return nil
} }
repo.CreateTag(tagstring, head.Hash(), nil) /* &git.CreateTagOptions{ repo.CreateTag(tagstring, head.Hash(), nil) /* &git.CreateTagOptions{
Message: tag, Message: tag,
})*/ })*/
logrus.Info(fmt.Sprintf("Created tag %s at %s.", tagstring, head.Hash())) logrus.Info(fmt.Sprintf("created tag %s at %s", tagstring, head.Hash()))
if Push { if Push {
if err := repo.Push(&git.PushOptions{}); err != nil { if err := repo.Push(&git.PushOptions{}); err != nil {
logrus.Fatal(err) logrus.Fatal(err)
} }
logrus.Info(fmt.Sprintf("Pushed tag %s to remote.", tagstring)) logrus.Info(fmt.Sprintf("pushed tag %s to remote", tagstring))
} }
return nil return nil
@ -248,24 +248,24 @@ or a rollback of an app.
} }
newTagString = newTag.String() newTagString = newTag.String()
} else { } else {
logrus.Fatal("we don't support auto tag generation yet. Specify a verion or use one of: --major --minor --patch") logrus.Fatal("we don't support automatic tag generation yet - specify a version or use one of: --major --minor --patch")
} }
newTagString = fmt.Sprintf("%s+%s", newTagString, mainAppVersion) newTagString = fmt.Sprintf("%s+%s", newTagString, mainAppVersion)
if Dry { if Dry {
logrus.Info(fmt.Sprintf("Dry run only. NOT creating tag %s at %s", newTagString, head.Hash())) logrus.Info(fmt.Sprintf("dry run only: NOT creating tag %s at %s", newTagString, head.Hash()))
return nil return nil
} }
repo.CreateTag(newTagString, head.Hash(), nil) /* &git.CreateTagOptions{ repo.CreateTag(newTagString, head.Hash(), nil) /* &git.CreateTagOptions{
Message: tag, Message: tag,
})*/ })*/
logrus.Info(fmt.Sprintf("Created tag %s at %s.", newTagString, head.Hash())) logrus.Info(fmt.Sprintf("created tag %s at %s", newTagString, head.Hash()))
if Push { if Push {
if err := repo.Push(&git.PushOptions{}); err != nil { if err := repo.Push(&git.PushOptions{}); err != nil {
logrus.Fatal(err) logrus.Fatal(err)
} }
logrus.Info(fmt.Sprintf("Pushed tag %s to remote.", newTagString)) logrus.Info(fmt.Sprintf("pushed tag %s to remote", newTagString))
} }
return nil return nil