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

fix: do not use tags for normal prerelease dependency bump #96

Closed
wants to merge 1 commit into from

Conversation

hanseltime
Copy link
Contributor

Fixes Issue 75

On Extensive debugging, the prerelease "next" logic that we use for bumping dependencies is disregarding the "_lastRelease" on a package and biasing on the git tags. This is an issue though, because we always end up having run the previous package's release thanks to the topo library, so there is a tag indicating the current release. Our desired release is this tag though and not the next increment. It is, however, the desired bump of the "_lastRelease" of that package.

Changes

To fix this, we keep a light touch by augmenting getNextPreVersion to:

  1. still consider tags if an explicit options flag is set
  2. Only consider lastRelease if not. (Which is the only way that it is used currently).

Since this is only actually used by the prerelease version and it is a well documented bug, the behavior of looking at tags is removed completely since _lastRelease should always be called by preceding packages and if not, would be handled by a failure in the preceding analyzeCommits.

  • New code is covered by tests
  • All the changes are mentioned in docs (readme.md) - There are no external changes

@hanseltime hanseltime force-pushed the fix-prerelease-bumping branch from 1fea2cb to 120b10d Compare September 16, 2023 23:24
@antongolub
Copy link
Member

@hanseltime,

Thanks for the digging. I'm worried about default behavior changing. Maybe it's better to introduce skipTagsFetch instead?

@hanseltime
Copy link
Contributor Author

@antongolub -

Sure thing. I'll update with a flag in the near future. I forgot that there may be people who have altered their workflows to circumvent this already. Will comment when I have updated it.

@hanseltime
Copy link
Contributor Author

Just wanted to post here. In order for the refactor to work, I need to make a few tests, but since my mac updated all of the temporary git tests are breaking. I will be looking into it.

I will try to have it up within a week 🤞

@hanseltime hanseltime mentioned this pull request Oct 1, 2023
2 tasks
@juancarlosjr97
Copy link

juancarlosjr97 commented Oct 4, 2023

I am not 100%, but would this also address indirectly the conflict of semantic release and multi-semantic-release are using the same note to check if a released can be executed or not?

See #98

@hanseltime
Copy link
Contributor Author

This ended up being set up in different PR due to the large changes needed.

#97

@hanseltime hanseltime closed this Nov 2, 2023
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

Successfully merging this pull request may close these issues.

Prereleases not updating correctly
3 participants