allow default bump type

Signed-off-by: Jan Braje <12571346+janluak@users.noreply.github.com>
pull/32402/head
Jan Braje 3 months ago
parent c6f3bf5dd9
commit 0574da7415
No known key found for this signature in database
GPG Key ID: AA98A2FCFE70D0C9

@ -61,6 +61,9 @@ func (b *Bump) Run(bumpType string, chartpath string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
if bumpType == "" {
bumpType = "patch"
}
b.bump = bumpType b.bump = bumpType
currentVersion := strings.TrimSpace(string(cv)) currentVersion := strings.TrimSpace(string(cv))

@ -54,6 +54,10 @@ func TestBump(t *testing.T) {
wantError: true, wantError: true,
}, { }, {
name: "default", name: "default",
cmd: "bump " + tempChartDir,
golden: "output/bump-default.txt",
}, {
name: "patch",
cmd: "bump patch " + tempChartDir, cmd: "bump patch " + tempChartDir,
golden: "output/bump-patch.txt", golden: "output/bump-patch.txt",
}, { }, {

@ -0,0 +1 @@
changed chart version to "0.1.1"

@ -1 +1 @@
changed chart version to "0.1.1" changed chart version to "0.1.2"

Loading…
Cancel
Save