Skip to content

fix: get correct version if prerelease branch shares version with ...#2416

Merged
gr2m merged 1 commit intosemantic-release:masterfrom
Tlepel:fix-versions-share-head
Jun 28, 2023
Merged

fix: get correct version if prerelease branch shares version with ...#2416
gr2m merged 1 commit intosemantic-release:masterfrom
Tlepel:fix-versions-share-head

Conversation

@Tlepel
Copy link
Copy Markdown
Contributor

@Tlepel Tlepel commented Apr 14, 2022

…other branches

Fixes #2415

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 24de2a4 to 406b9ad Compare April 14, 2022 12:54
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 406b9ad to 6d6acd3 Compare April 14, 2022 17:02
Copy link
Copy Markdown

@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.)

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 6d6acd3 to e6ea0e2 Compare April 27, 2022 15:59
@Tlepel Tlepel force-pushed the fix-versions-share-head branch 4 times, most recently from 1dd1fcb to 5bd7b02 Compare June 20, 2022 09:35
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 5bd7b02 to c480244 Compare June 29, 2022 10:31
@Tlepel Tlepel requested a review from travi June 29, 2022 10:32
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from c480244 to ca4fba5 Compare July 6, 2022 08:04
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from ca4fba5 to 753bac8 Compare July 15, 2022 11:38
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 753bac8 to a5dc2d3 Compare July 25, 2022 08:40
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from a5dc2d3 to 4512679 Compare August 3, 2022 12:35
Copy link
Copy Markdown

@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 Tlepel force-pushed the fix-versions-share-head branch from 4512679 to ef82181 Compare September 5, 2022 11:26
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from ef82181 to 445861c Compare October 4, 2022 10:03
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 445861c to c1b4646 Compare October 12, 2022 09:09
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from c1b4646 to bd378c7 Compare November 17, 2022 09:19
@Tlepel
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

Could we get this reviewed and merged? 😇

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from da9544b to 94b725e Compare January 24, 2023 14:16
@taorepoara
Copy link
Copy Markdown

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.

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 94b725e to e8f6fee Compare January 25, 2023 14:21
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from e8f6fee to 1ab4f6e Compare February 8, 2023 14:54
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 1ab4f6e to be9e36f Compare February 23, 2023 14:13
@frnode
Copy link
Copy Markdown

frnode commented Mar 14, 2023

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

@taorepoara
Copy link
Copy Markdown

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 Tlepel force-pushed the fix-versions-share-head branch from be9e36f to fe3b22d Compare March 15, 2023 09:36
@Tlepel
Copy link
Copy Markdown
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.

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from fe3b22d to f23984b Compare March 22, 2023 08:28
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from f23984b to d39357c Compare March 31, 2023 13:25
@Tlepel Tlepel force-pushed the fix-versions-share-head branch 2 times, most recently from 5f85888 to d8da89b Compare April 24, 2023 08:52
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from d8da89b to f17288c Compare May 2, 2023 07:41
@renestalder
Copy link
Copy Markdown

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

@Tlepel
Copy link
Copy Markdown
Contributor Author

Tlepel commented May 3, 2023

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

I sure hope not 😅

@Tlepel Tlepel force-pushed the fix-versions-share-head branch from f17288c to 87c82bc Compare May 8, 2023 12:29
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 87c82bc to 3ebc0dd Compare May 22, 2023 12:39
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 3ebc0dd to 448fd3f Compare June 21, 2023 09:37
@Tlepel Tlepel force-pushed the fix-versions-share-head branch from 448fd3f to d7cfe02 Compare June 28, 2023 10:12
@Langstra
Copy link
Copy Markdown

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
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

🎉 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