Add -n and -m to recipes/upgrade #291
Reference in New Issue
Block a user
No description provided.
Delete Branch "cr_upgrade_noninnteractive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Support the no-input flag and the machine-readable-output flag in the
recipe upgradecommand.Nice one, thanks! Some minor comments.
@ -27,6 +28,13 @@ type imgPin struct {version tagcmp.Tag}type anUpgrade struct {Missing doc string? E.g.
@ -249,0 +261,4 @@Service: service.Name,Image: image,Tag: tag.String(),UpgradeTags: make([]string, len(compatibleStrings[1:])),Maybe sticking
len(compatibleStrings[1:])in a named variable will be more readable since it is used twice. The1:...is sure to not stack trace since there is always 1 entry in it? We could comment that out also.The
len()is less useful than the slice, I've made that change.@ -252,0 +278,4 @@} else {prompt := &survey.Select{Message: msg,Help: "enter / return to confirm, choose 'skip' to not upgrade this tag, vim mode is enabled",Should we make this a
constsomewhere? Think it's getting re-used in several places now.We should do but I don't want to muddle this in with the change.
@ -268,0 +308,4 @@jsonstring, err := json.Marshal(upgradeList)if err != nil {logrus.Fatal(err)} else {This is a dangling else, it can be dropped?
yep! done
@ -268,0 +312,4 @@fmt.Println(string(jsonstring))}} else {For readability, this
elsecould be also dropped if youreturnearlier in the above block. Up to you.Yep, does looks cleaner. Done.