Skip to content

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

Merged
merged 11 commits into from
Mar 7, 2022
Merged

Conversation

jacksbox
Copy link
Contributor

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 to beta) as well as a cli flag to trigger a prerelease.
Using the --prerelease flag will trigger the determined next version for the cli commands print_version, version and publish 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 beeing 1.0.0) then the prerelease number will be incremented, leading to 1.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?

@jacksbox jacksbox mentioned this pull request Feb 10, 2022
@williamluke4
Copy link
Contributor

@jacksbox Are you still working on this?

@jacksbox
Copy link
Contributor Author

jacksbox commented Mar 2, 2022

@williamluke4 nope, I'm waiting for a review of the PR :)
It is in a working state and as far as I can see does not break anything - so I would see this is a good situation to get it merged and if needed to branch out for more features

Copy link
Contributor

@williamluke4 williamluke4 left a 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 🎉

@jacksbox
Copy link
Contributor Author

jacksbox commented Mar 7, 2022

removed my leftover todo comments
this PR should than be ready to merge :) (at least from my side)

@danth danth merged commit 7064265 into python-semantic-release:master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants