Version Patterns
flopha matches and generates versions from string patterns with three placeholders:
{major}{minor}{patch}
Use {semver} as shorthand for {major}.{minor}.{patch}.
Common examples
flopha last-version --pattern "v{major}.{minor}.{patch}"
flopha next-version --pattern "desktop@{semver}"
flopha next-version --pattern "release/{major}.{minor}.{patch}" --source branch
How matching works
The pattern is converted into a full regular expression internally. Static text must match exactly, while placeholders are treated as numeric capture groups.
That means:
desktop@{major}.{minor}.{patch}matchesdesktop@1.3.7desktop@{semver}matchesdesktop@1.3.7release/{major}.{minor}.{patch}matchesrelease/2.0.0v1.{minor}.{patch}scopes operations to the1.xline
When to use branches instead of tags
Use --source branch when versions represent release branches instead of Git tags:
flopha next-version \
--source branch \
--pattern "release/{major}.{minor}.{patch}" \
--create
Pre-release channels
Pre-releases always extend the computed stable version:
flopha next-version --pre alpha
flopha next-version --pre beta
flopha next-version --pre rc
If the repository already contains v2.4.0-rc.1, the next invocation produces v2.4.0-rc.2.