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

[Suggestion] requireBranch could allow pre-releases from other branches #829

Closed
dominguesgm opened this issue Oct 28, 2021 · 4 comments
Closed

Comments

@dominguesgm
Copy link

I came across this possible opportunity for improvement when trying to release an alpha version of a package from a branch, in order to test it out on a consuming project that had requireBranch configured to master.

I think there's a case to be made for only permitting regular releases to happen from master, but still allowing pre-releases from other branches for these sorts of testing purposes. However, as far as I can tell, setting requireBranch in the configuration will stop any sort of release from happening from a branch different than the one configured.

I'm not necessarily suggesting a change in the behaviour of requireBranch, but I think there could be an additional property to be used in tandem with requireBranch that would allow pre-releases to happen from different branches, something like preReleaseIgnoreRequireBranch or similar.

If this seems like a useful addition to you guys, I wouldn't mind trying to tackle it myself.

@webpro
Copy link
Collaborator

webpro commented Nov 6, 2021

A related issue was opened before (#811), which may be interesting to take into account here. Any ideas?

I'd be interested to work on this, but a PR would be even more appreciated (also without the other RFC).

@dominguesgm
Copy link
Author

dominguesgm commented Nov 7, 2021

I see how the approach mentioned in #811 relates, but I think that needing to change the configuration in order to set a branch as a pre-release branch would lead to frequently changing a config file, which in my opinion should be avoided.

Perhaps instead of specifying the branch, it could a branch prefix/suffix that would inform release-it if the releases from that branch should be pre-releases. My concern here is that it starts becoming a bit opinionated on the tie-in between branch name and type of release.

For example, if one usually names branches after a feature or a sort of ticket/issue id, it seems odd to pre-emptively add a prefix/suffix just in case one might want to pre-release from the branch.

Nevertheless, though the issues are related, I don't see how both solutions can't coexist. My issue is more about allowing pre-releases in some circumstances, whereas from what I understand #811 concerns more about automatically detecting the type of releases from predefined branches.

If this seems relevant, I will tackle as soon as I have the time to do so.

@webpro
Copy link
Collaborator

webpro commented Mar 19, 2022

Perhaps this helps? #877

@stale
Copy link

stale bot commented Jun 19, 2022

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jun 19, 2022
@stale stale bot closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants