guilhem / bump

CLI to bump version tag in a git repository following semver
Apache License 2.0
25 stars 3 forks source link

Cannot bump patch past 1 #5

Closed joncrlsn closed 3 years ago

joncrlsn commented 3 years ago

If my tag is 0.20.0, bump patch will bump it to 0.20.1.

However, if I try running it again, bump patch returns this:

0.20.1
2021/03/02 10:43:19 fail to create tag: tag already exists
guilhem commented 3 years ago

Ok, I found the problem, as both patch are on the same commit, they have the same date and comparison fail. https://github.com/guilhem/bump/blob/e934d5578178677da09827ed7e6c084ffe2ac090/pkg/git/git.go#L143

Fixing it