forked from toolshed/abra
feat: version arguments, local tag lookups & release notes
See: * coop-cloud/organising#441 * coop-cloud/organising#204 * coop-cloud/organising#493
This commit is contained in:
@ -32,17 +32,9 @@ func NewVersionOverview(app config.App, currentVersion, newVersion, releaseNotes
|
||||
table.Append([]string{server, app.Recipe, deployConfig, app.Domain, currentVersion, newVersion})
|
||||
table.Render()
|
||||
|
||||
if releaseNotes == "" {
|
||||
var err error
|
||||
releaseNotes, err = GetReleaseNotes(app.Recipe, newVersion)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if releaseNotes != "" && newVersion != "" {
|
||||
fmt.Println()
|
||||
fmt.Println(fmt.Sprintf("%s release notes:\n\n%s", newVersion, releaseNotes))
|
||||
fmt.Print(releaseNotes)
|
||||
} else {
|
||||
logrus.Warnf("no release notes available for %s", newVersion)
|
||||
}
|
||||
@ -80,7 +72,8 @@ func GetReleaseNotes(recipeName, version string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(releaseNotes), nil
|
||||
withTitle := fmt.Sprintf("%s release notes:\n%s", version, string(releaseNotes))
|
||||
return withTitle, nil
|
||||
}
|
||||
|
||||
return "", nil
|
||||
|
Reference in New Issue
Block a user