Skip to content

Commit

Permalink
fix(changelog): verify that new version is greater than current
Browse files Browse the repository at this point in the history
  • Loading branch information
zbindenren committed Jan 5, 2021
1 parent 4b5090c commit 85b778f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func (c Command) runRelease(dst io.Writer, l *flash.Logger, cfg config.Changelog
return err
}

if version.Equal(current) {
return fmt.Errorf("version %s already exists", version)
if !version.GreaterThan(current) {
return fmt.Errorf("version must be greater than current version %s", current)
}

title := fmt.Sprintf("%s (%s)", version, time.Now().Format(dateFormat))
Expand Down

0 comments on commit 85b778f

Please sign in to comment.