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

No Pre-Release Tags if Major Version is 0 #214

Open
adamgranthendry opened this issue Apr 29, 2021 · 1 comment
Open

No Pre-Release Tags if Major Version is 0 #214

adamgranthendry opened this issue Apr 29, 2021 · 1 comment

Comments

@adamgranthendry
Copy link

Is there a way to prevent pre-release tags from appearing if the major verison is 0 (i.e. rapid development?). As it stands, my .bumpversion.cfg is

[bumpversion]
current_version = 0.0.0
tag = False
tag_name = {new_version}
commit = True
parse =
    (?P<major>\d+)
    \.
    (?P<minor>\d+)
    \.
    (?P<patch>\d+)
    (\-(?P<pre>[a-z]+)\.(?P<prenum>\d+))?
serialize =
    {major}.{minor}.{patch}-{pre}.{prenum}
    {major}.{minor}.{patch}

[bumpversion:part:pre]
optional_value = placeholder
first_value = alpha
values =
    alpha
    beta
    rc
    placeholder

[bumpversion:part:prenum]
first_value = 1

[bumpversion:file:pyproject.toml]

which adds pre-release values when I bump part minor

>>> bumpversion minor
Bumpversion: 0.0.0 -> 0.1.0-alpha.1

I want this behavior to occur when going from major rev 0 to 1 or N to N+1 for all N > 0, just not for rapid development. I'd hate to have to manually type out --new-version for every bump while in rapid development.

Does anyone have a solution?

@adamgranthendry
Copy link
Author

Please see my StackOverflow answer for a "monkey-patch"/work-around solution.

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

No branches or pull requests

1 participant