I have a Python script that lives in my CI pipeline that is responsible for publishing branches and tags, publishing AAR's to our Maven Artifactory, uploading Javadoc, etc.
We used to follow a modified version of Git Flow where we would publish off of either a "support/" branch (for Long Term Support of a Minor Product Version, such as 'support/5.10') or a "release/" branch (for release regression testing.
My script largely relied upon the Git Branch name in order to determine Major/Minor/Patch version bumps.
Now, we are dropping the support branches and moving to a more vanilla Git Flow workflow where we will do HotFixes solely off of Master (well, we will still have release branches, but that problem is solved...)
However, I can't figure out a way to safely determine the patch version off of the Master branch, as it obviously has no identifying characteristics in it's name that we can scrub (I always felt a bit uneasy about the method we are using, but... it worked).
I can access the tags and always bump the highest one, but that's sketchy.
I can input a target version, but that gets in the way of CI and would force us to run this script manually.
Any other thoughts on how to approach this? Anyone already solved this problem?