Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let branches deviate #136

Open
MagicLegend opened this issue May 24, 2022 · 1 comment
Open

Let branches deviate #136

MagicLegend opened this issue May 24, 2022 · 1 comment

Comments

@MagicLegend
Copy link

MagicLegend commented May 24, 2022

Hi!

I have a usecase where I want a v1 and v2 version of a project in the same repo. Currently it seems to only be able to use a single version number, but I want it to bump according to the branch. Is there a way to get this to work? Currently it just seems to take whatever was the latest version anywhere, and bump that.

Thank you!

@stevenmcohn
Copy link

This seems mostly solved by v6.0 using the pre_release_branches and default_prerelease_bump parameters. We use typical GitHub flow with a main branch and short feature branches.

But we also have a need to create hotfix branches from main. The hotfix branches are created from specific tag commits on main, for example, from tag v1.0.0, we'll create a hotfix branch named hotfix-v1.0.0 so we know where it originated. We then create feature branches off of hotfix-v1.0.0.

When I merge one of these hotfix feature branches back into hotfix-v1.0.0, I'd like it be tagged as a patch, so v1.0.1. This works as expected by setting default_prerelease_bump to prepatch, or by specifying a commit message like "fix(blah): something"

One caveat is this. Suppose you have a main with multiple tags already, v1.0.0 and v1.1.0. Create a hotfix branch based on the v1.0.0 commit hash, called hotfix-v1.0.0. When I create a feature branch from that and merge it back in, it will be tagged as v1.1.1 instead of v1.0.1 because github-tag-action still considers up all of the tags in the repo. We can live with this but it would be nicer if it recognize this case and bumped from the last tag used on the nearest parent branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants