fix(upgrade): make upgrade --chaos working again
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8a0274cac0
commit
e6b35e8524
@ -194,23 +194,24 @@ recipes.
|
|||||||
// check out the tag and then they'll appear to be missing. this covers
|
// check out the tag and then they'll appear to be missing. this covers
|
||||||
// when we obviously will forget to write release notes before publishing
|
// when we obviously will forget to write release notes before publishing
|
||||||
var releaseNotes string
|
var releaseNotes string
|
||||||
for _, version := range versions {
|
if chosenUpgrade != "" {
|
||||||
parsedVersion, err := tagcmp.Parse(version)
|
|
||||||
if err != nil {
|
|
||||||
logrus.Fatal(err)
|
|
||||||
}
|
|
||||||
parsedChosenUpgrade, err := tagcmp.Parse(chosenUpgrade)
|
parsedChosenUpgrade, err := tagcmp.Parse(chosenUpgrade)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
for _, version := range versions {
|
||||||
if parsedVersion.IsGreaterThan(parsedDeployedVersion) && parsedVersion.IsLessThan(parsedChosenUpgrade) {
|
parsedVersion, err := tagcmp.Parse(version)
|
||||||
note, err := internal.GetReleaseNotes(app.Recipe, version)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
if note != "" {
|
if parsedVersion.IsGreaterThan(parsedDeployedVersion) && parsedVersion.IsLessThan(parsedChosenUpgrade) {
|
||||||
releaseNotes += fmt.Sprintf("%s\n", note)
|
note, err := internal.GetReleaseNotes(app.Recipe, version)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if note != "" {
|
||||||
|
releaseNotes += fmt.Sprintf("%s\n", note)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user