-
Notifications
You must be signed in to change notification settings - Fork 255
Feature/prerelease #413
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
Feature/prerelease #413
Conversation
20688be
to
884e9a3
Compare
@jacksbox Are you still working on this? |
@williamluke4 nope, I'm waiting for a review of the PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the remaining TODO comments, it looks good to me. Great Work 🎉
removed my leftover todo comments |
First take on making prereleases possible
I had some time implementing my feature request from here #386
What is does
It is a first take on enabling to do prereleases with python-semantic-release. For a start I implemented a config option to define what suffix a prerelease should use (e.g.
alpha
,beta
,rc
- defaulting tobeta
) as well as a cli flag to trigger a prerelease.Using the
--prerelease
flag will trigger the determined next version for the cli commandsprint_version
,version
andpublish
to be a prerelease.The version number will be determined as normal:
Find the last (important) non-prerelease version and determine the bump (or use the forced level)
Bump the version and append
-{prerelease_tag}.0
to it.Should there already be a prerelease version for the determined new version (
1.0.0-beta.0
already exists for the next version beeing1.0.0
) then the prerelease number will be incremented, leading to1.0.0-beta.1
in the previouse example.I tried to make my code additions as unintrusive as possible and added/updated tests to check the behavior. All unit tests pass, so I'm optimistic that it will work in all cases.
Happy to get feedback and a review :)
One finding: It would be nice to have some full end-to-end tests, without mocks (maybe expect for the git interaction) to see if all parts work well together. Wdyt?