-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow passing additional arguments to git-semver-tags #152
Comments
Would be good if #98 can be merged prior to any of this. |
I'm not sure I follow your use case - can you not just tag the commit when you cut the branch? Are you making new commits on the version branches? That sounds like it could very quickly become non-trivial to reason about. I'm not sure that passing |
However, I do think that exposing the options for git-semver-tags is in-keeping with the existing patterns of passing options through to the underlying conventional-changelog packages, so that seems reasonable to me. |
Yes, there could be. There might be a constellation where the default branch is way ahead of a version branch (lets say a feature was refactored and a bug ruled out), but there still is a bug on a version branch that needs fixing. Cherry picking is not a solution here, because there might be unwanted changes coming with it. Passing It might be that we do something weird and unusual. Would you recommend any change? :) |
@TimothyJones do you have any updates? |
Apologies, I haven’t had a chance to look at a fix for this yet. I can get to it in a couple of weeks, or alternatively I’d be happy to review a PR if you’re able to raise one |
Yeah, i can give it a go :) |
My experience is that it's better to roll forward if possible - where you try to keep all deployments / installations on the latest version with a linear history. This means you don't have to reason about whether changes in one version affect another, and you know that 2.3.x has all fixes that were in 2.2.x, etc. This assumption is baked in to the way that commit-and-tag-version reasons about version bumps, so I think if you did pull all tags you might end up in a situation where you have surprising or conflicting results. |
Even ignoring which tool you use to track versions, I'm not sure how you'd communicate the implication of version changes to users - I don't think what you're doing is strictly against the letter of semver, but it might be against the spirit:
|
One improvement i immediately see is that prior to creating a version branch we can just tag the version on the default branch.
Once we bump/tag a major/minor version the default branch has technically the same code as the version branch. Only once changes, that should not make it into the current release, have been pushed to the default branch they differ. |
Preamble
The current implementation of
git-semver-tags
usesgit log
to retrieve information about git tags. This works fine for any workflow where one tags the default branch. Other workflows such as version branches, where additional tags are created, are not supported.Problem
My usecase, version branches, is not fully supported, because tags on commits only live on their corresponding version branch:
The commits never reach the default branch and are therefore missing from the result of
git-semver-tags
.Possible Solution
I have tried to use
git tag
instead ofgit log
here. But to no avail.There however is a possible solution that involves passing
--all
togit-semver-tags
. This solves the issue wheregit-semver-tags
only finds tags on the current branch.There should be an option (always optional) for passing additional arguments to
git-semver-tags
:commit-and-tag-version/lib/latest-semver-tag.js
Line 6 in fabd8cd
Should i propose a solution?
The text was updated successfully, but these errors were encountered: