Skip to content

Commit

Permalink
fix: show versions correctly when bumping recipe version
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Oct 30, 2024
1 parent 618747b commit 78f325b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/cli/bumpver.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,17 @@ func runBumpVer(cmd *cobra.Command, opts bumpVerOpts) error {
changelogMsg = opts.ChangelogMsg
}

verWithPrefix := "v" + newVer.String()
newVerWithPrefix := "v" + newVer.String()
prevVer := re.Metadata.Version

re.Metadata.UpdateVersion(re, verWithPrefix, changelogMsg)
re.Metadata.UpdateVersion(re, newVerWithPrefix, changelogMsg)

err = re.Save(opts.RecipePath)
if err != nil {
return err
}

cmd.Printf("bumped version: %s => %s \n", re.Metadata.Version, verWithPrefix)
cmd.Printf("bumped version: %s => %s \n", prevVer, newVerWithPrefix)
cmd.Printf("with changelog message: %s \n", changelogMsg)

return nil
Expand Down

0 comments on commit 78f325b

Please sign in to comment.