revsys/vinnie

add suffix flag

gladiatr72 opened this issue · 0 comments

adds a --suffix flag that operates similarly to the --prefix flag

At this point, specifying a prefix and/or suffix causes vinnie to start a new version stack because of how version validation is done.

If you have a set of tags, 0.0.1 - 0.0.5 then use a --*fix flag, vinnie starts over at 0.0.0 since the pre/suffix becomes part of the validation pattern.

My idea for --suffix is being able to create feature-branch tags in CI, but rather than starting the versioning at 0 (or 1) to have it switch into a hybrid semver/integer-version mode where the semver portion of the tag is frozen and an incrementing counter is added to the tail of the suffix.

For example, if the nearest proximal master tag is v1.0.1, commits to a feature branch would generate v1.0.1-fb1, v1.0.1-fb2, etc. If the branch is merged or rebased against master, it would pick up (again) the nearest proximal tag following standard semver.