Skip to content

The version number will be confused when use --prerelease option #434

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

Closed
donhui opened this issue Mar 31, 2022 · 8 comments
Closed

The version number will be confused when use --prerelease option #434

donhui opened this issue Mar 31, 2022 · 8 comments
Labels
bug Something isn't working properly stale

Comments

@donhui
Copy link

donhui commented Mar 31, 2022

The problem

The version number will be confused when use --prerelease option:
image

Expected behavior

The version number is incremented in the normal way.

Additional context

When I execute this command many times, there is a problem with the version number, the log as follows:

(venv) pydemo % semantic-release version  --prerelease 
Creating new version
Current version: 0.3.5
Bumping with a None version to 0.3.5-beta.3
(venv) pydemo % semantic-release version  --prerelease
Creating new version
Current version: 0.3.6
Bumping with a None version to 0.3.6-beta.4
(venv) pydemo % semantic-release version  --prerelease
Creating new version
Current version: 0.3.5
Bumping with a None version to 0.3.5-beta.5
(venv) pydemo % semantic-release version  --prerelease
Creating new version
Current version: 0.3.6
Bumping with a None version to 0.3.6-beta.6

semantic_release config in pyproject.toml:

[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
@donhui donhui added the bug Something isn't working properly label Mar 31, 2022
@jacksbox
Copy link
Contributor

jacksbox commented Apr 7, 2022

@donhui I reworked the prerelease feature in this PR: #435
My local tests gave the correct results, maybe you run your example again with the the code from this branch to make sure it works?
(also, it will only work if all version bumps are done on the same branch)

@FlorentGodin
Copy link

Hello,

How does it work when you use the command semantic-release version --prerelease multiple times ?
The first time I got a correct version (like 1.1.0-beta.0) but next, it tells me error: no versions found in the configured locations. It seems it comes from the parsing (the regex does not include prerelease).

My pyproject.toml :

[tool.semantic_release]
version_variable = [
    "src/dummy_package/__init__.py:__version__",
]

Do I forget something ?

@jacksbox
Copy link
Contributor

@FlorentGodin I made an error when implementing - a new fixed version is already in progress

@FlorentGodin
Copy link

Thanks @jacksbox!

@github-actions
Copy link

github-actions bot commented May 3, 2022

This bug report has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed.

@github-actions github-actions bot added the help-wanted Extra attention is required label May 3, 2022
@github-actions github-actions bot removed the help-wanted Extra attention is required label Oct 23, 2022
@github-actions
Copy link

This bug report has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed.

@github-actions github-actions bot added help-wanted Extra attention is required and removed help-wanted Extra attention is required labels Nov 13, 2022
Copy link

This issue is stale because it has not been confirmed or planned by the maintainers and has been open 90 days with no recent activity. It will be closed in 7 days, if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 26, 2024
Copy link

github-actions bot commented Apr 2, 2024

This issue was closed because activity was dormant for 97 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly stale
Projects
None yet
Development

No branches or pull requests

3 participants