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

The tool does not detect whether a release already exists #134

Open
mcmire opened this issue Mar 1, 2024 · 4 comments
Open

The tool does not detect whether a release already exists #134

mcmire opened this issue Mar 1, 2024 · 4 comments
Labels
bug Something isn't working team-wallet-framework

Comments

@mcmire
Copy link
Contributor

mcmire commented Mar 1, 2024

When this tool assigns a new version to the project, it takes the current version as specified in package.json and increments it. It also uses the same version in the name of the release branch.

This works fine if there are no releases in review when the release branch is created. But what if someone has already created a release and somebody else tries to make a new release? Then the version assigned will be the same as the existing one, and when the user tries to push the branch, they will receive an error.

The tool should look for and consider remote release branches when assigning the new version.

@mcmire mcmire changed the title Detect existing open releases and ask what the user wants to do Consider existing open releases when assigning a new version Mar 1, 2024
@mikesposito
Copy link
Member

mikesposito commented Mar 4, 2024

Perhaps in case there is indeed a remote release branch already, the new release branch should be based on the already-existing remote instead of main?

Let's say there is an origin/release/100 branch already (with relative Release 100.0.0 PR open): running the tool locally should result in a new branch release/101 based on origin/release/100.

This would avoid releasing the same packages twice, keeping releases in a queue. This behavior would then be ignored when the user is already on a release branch (#137)

@mcmire
Copy link
Contributor Author

mcmire commented Mar 4, 2024

Ah yes, good point about basing the new branch off the existing branch. I'd imagine we'd probably want to use the latest existing release branch in case there are multiple.

@desi
Copy link
Contributor

desi commented Mar 6, 2024

@mcmire and @desi this is being considered for Q2-24

@mcmire mcmire changed the title Consider existing open releases when assigning a new version The tool does not detect whether a release already exists Nov 20, 2024
@mcmire mcmire added the bug Something isn't working label Nov 20, 2024
@mcmire
Copy link
Contributor Author

mcmire commented Jan 23, 2025

We discussed this today in review and @mikesposito's solution sounds like it would work fine. There is a risk that if the new release branch is based on the existing branch, the author of the second branch might merge theirs into the first accidentally, and either that would be surprising or the release number would increment by 2 instead of 1. It may be worth it to write up some documentation to address this scenario and offer guidance, but that may be out of scope for this ticket. Regardless it seems we have a path forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-wallet-framework
Projects
None yet
Development

No branches or pull requests

3 participants