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: get correct version if prerelease branch shares version with ... #2416

Merged
merged 1 commit into from Jun 28, 2023

Conversation

Tlepel
Copy link
Contributor

@Tlepel Tlepel commented Apr 14, 2022

…other branches

Fixes #2415

Copy link

@limulus limulus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Tlepel! Thanks for making this PR, I just happened to run into the same issue. I think I found a potential issue with this PR though. (See the code comment.)

lib/get-last-release.js Outdated Show resolved Hide resolved
Copy link

@shiipou shiipou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tlepel
Copy link
Contributor Author

Tlepel commented Nov 25, 2022

@travi whould you have time to review this PR? I try to rebase every time commits were merged to master, but to be fair I don't feel like keeping that going. I'd love to get some feedback if the PR is not up to standards, and improve the code if necessary, since it seems like more people might need this fix.

@Tlepel Tlepel force-pushed the fix-versions-share-head branch 3 times, most recently from 1665c39 to 15aad9e Compare December 13, 2022 10:51
@taorepoara
Copy link

We use two pre-release channels on our projects: alpha and beta.

We used to have a problem since channels are stored in the tag notes: when a commit is released to the alpha channel and then the beta channel, every thing is fine, but when another commit is released to the alpha channel (if the previous is not released in the main branch), the previous alpha release is not found and it try to create another alpha release with the same version...

This PR fixes our issues.

@Tlepel Tlepel force-pushed the fix-versions-share-head branch 2 times, most recently from 73471f3 to da9544b Compare January 16, 2023 12:22
@Langstra
Copy link

Could we get this reviewed and merged? 😇

@taorepoara
Copy link

taorepoara commented Jan 24, 2023

For those who are tired to wait for this merge I found another project that could do the job: convco. They have just added the prerelease management. It does not work the same as Semantic Release, but it should work fine.

@frnode
Copy link

frnode commented Mar 14, 2023

I have same issue... Anyone if we can work around the problem temporarily?
thank you

@taorepoara
Copy link

I have same issue... Anyone if we can work around the problem temporarily? thank you

You can use the @Tlepel version instead of the official one.

Instead of installing semantic-release official version use the next code:

npm i "https://github.com/Tlepel/semantic-release.git#fix-versions-share-head"

The problem with this solution is that the this PR is FINALLY merged, you'll have to change your CI back to the official version of semantic release, since this branch will be closed.

@Tlepel
Copy link
Contributor Author

Tlepel commented Mar 15, 2023

@gr2m Perhaps you can have a look at this PR? It seems that quite some projects run into this issue and the fix isn't too complicated. @travi is on the list of reviewers but he hasn't reviewed this PR after his initial review on the day I created this PR.

@renestalder
Copy link

Is he going to break the record for the longest ever rebase run? :)

@Tlepel
Copy link
Contributor Author

Tlepel commented May 3, 2023

Is he going to break the record for the longest ever rebase run? :)

I sure hope not 😅

@Langstra
Copy link

Is he going to break the record for the longest ever rebase run? :)

Looks more and more like it. Anyone any idea what the record is?

Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright sorry for the wait! We hoped to find the time to do a deeper dive into potential unwanted side effects, but at this point all your contributions (and patience) outweigh the risk. Thank you all 💐💝

@gr2m gr2m merged commit e4229f9 into semantic-release:master Jun 28, 2023
4 checks passed
@github-actions
Copy link

🎉 This PR is included in version 21.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Release picks wrong version when several previous (pre)releases share same HEAD
9 participants