Skip to content

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

Closed as not planned

Description

@donhui

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"

Activity

  1. added
    bug
    on Mar 31, 2022
  2. jacksbox commented on Apr 7, 2022

    @jacksbox
    Contributor

    @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)

  3. FlorentGodin commented on Apr 11, 2022

    @FlorentGodin

    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 ?

  4. jacksbox commented on Apr 11, 2022

    @jacksbox
    Contributor

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

  5. FlorentGodin commented on Apr 11, 2022

    @FlorentGodin

    Thanks @jacksbox!

  6. github-actions commented on May 3, 2022

    @github-actions

    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.

  7. added
    help-wanted
    on May 3, 2022
  8. removed
    help-wanted
    on Oct 23, 2022
  9. github-actions commented on Nov 13, 2022

    @github-actions

    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.

  10. added
    help-wanted
    and removed
    help-wanted
    on Nov 13, 2022
  11. github-actions commented on Mar 26, 2024

    @github-actions

    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.

  12. github-actions commented on Apr 2, 2024

    @github-actions

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions