guilhem / bump

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

Optionally ignore tags which aren't ancestors of HEAD #4

Open OliverEvans96 opened 4 years ago

OliverEvans96 commented 4 years ago

This is necessary in order use this tool with multiple actively developed major versions, which is one of the primary advantages of using semver in the first place.

Say I have a v1 branch with latest tag v1.1.0 and a v2 branch with latest tag v2.0.1. If I make a minor change to the v1 branch to create the tag v1.2.0, even if the v2.0.1 tag was created more recently than v1.1.0. This is accomplished by only considering ancestors of HEAD when searching for the latest tag.

Cheers, Oliver

guilhem commented 3 years ago

ooooooh sorry @OliverEvans96 I missed your PR. It's an excellent work. I change the way commit are parsed in #6 and now only work with ancestors.

Do you think it's a good way to do?