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

(conventional-recommended-bump) Specify base tag to analyze tags from #777

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kf6kjg
Copy link

@kf6kjg kf6kjg commented Mar 9, 2021

This feature allows the user to specify the base tag from which to scan for version tags, allowing for tooling like standard-version to pull the previous version from some other location than the most recent tag. As simple icing I added the flag to the both the recommended-bump and changelog CLIs so that users of those tools can enjoy this feature there as well.

I chose not to attempt a "to" flag as that would make this much more complex and is not needed for my use case just now.

Also fixes a bug in conventional-recommended-bump that would cause a callback to not be called if the gitRawCommits function emitted an error instead of returning a stream.

AFAICT this could be a fix for both #194 and #612, but this was mainly to solve a problem in standard-version. I'll link the PR to that repo once I've got it created.

In my use-case I don't store the changelog in the committed code as it has problems when dealing with branches. I don't see any generic way to solve that problem, so instead I use my own repo-specific algorithm to determine which tag in the history is the "correct" parent tag depending on several bits of repo-specific context and then need to generate the changelog and recommended bump based off that tag, and not before.

@kf6kjg kf6kjg changed the title Tag from (conventional-recommended-bump) Specify base tag to analyze tags from Mar 9, 2021
Otherwise we just get spew on the console without the code ever knowing that an error happened.
This feature allows the user to specify the base tag from which to scan for version tags, allowing for tooling like standard-version to pull the previous version from some other location than the most recent tag.
With this a user can generate a partial changelog starting at a specific tag and proceeding to the current version.

I chose not to attempt a "to" flag as that would make this much more complex and is not needed for my use case just now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant