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

Support pre-releases with multiple digits #64

Closed
playpauseandstop opened this issue May 12, 2021 · 0 comments · Fixed by #66
Closed

Support pre-releases with multiple digits #64

playpauseandstop opened this issue May 12, 2021 · 0 comments · Fixed by #66
Assignees
Labels
bug Something isn’t working
Milestone

Comments

@playpauseandstop
Copy link
Owner

TLDR: Seems like badabump doesn't properly handle version tags of pre-releases with multiple digits, such as v21.1.0a10

Got strange issues on running, python3 -m badabump.ci prepare_release "refs/tags/v21.1.0a10",

Traceback (most recent call last):
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/ci/__main__.py", line 5, in <module>
    raise SystemExit(main())
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/cli/ci_app.py", line 113, in main
    return cast(int, args.func(args, config=config))
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/cli/ci_app.py", line 52, in prepare_release
    version = Version.from_tag(tag_ref, config=config)
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/versions/version.py", line 30, in from_tag
    return cls.parse(
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/versions/version.py", line 79, in parse
    pre_release=pre_release.PreRelease.from_parsed_dict(
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/versions/pre_release.py", line 73, in from_parsed_dict
    pre_release_type=guess_pre_release_type(
  File "/Users/playpauseandstop/.pyenv/versions/3.8.8/lib/python3.8/site-packages/badabump/versions/pre_release.py", line 120, in guess_pre_release_type
    return {
KeyError: 'a1'

Need to figure out where the problem and fix it to support pre-releases with multiple digits.

@playpauseandstop playpauseandstop added the bug Something isn’t working label May 12, 2021
@playpauseandstop playpauseandstop added this to the 21.2.0 milestone May 12, 2021
@playpauseandstop playpauseandstop self-assigned this May 12, 2021
playpauseandstop added a commit that referenced this issue May 12, 2021
Previously regexp for parsing pre-releases failed for Python as there is
no delimiter between pre-release type (`a`, `b`, `rc`) and version.

Cause of that change the regexp for type to expect only non-digit
symbols (`\D+`) instead of expecting any symbols (`.+`)

Fixes: #64
playpauseandstop added a commit that referenced this issue May 12, 2021
Previously regexp for parsing pre-releases failed for Python as there is
no delimiter between pre-release type (`a`, `b`, `rc`) and version.

Cause of that change the regexp for type to expect only non-digit
symbols (`\D+`) instead of expecting any symbols (`.+`)

Fixes: #64
badabump-release-bot bot pushed a commit that referenced this issue May 12, 2021
Features:
---------

- [#34] Put refactor commits into separate section (#58)

Fixes:
------

- [#64] Support pre-releases with multiple digits (#66)
- [#63] Escape backticks when setting output at GitHub Actions (#67)

Other:
------

- (**deps-dev**) Bump coverage from 5.3.1 to 5.4 (#47)
- (**deps-dev**) Bump pytest from 6.2.1 to 6.2.2 (#50)
- (**deps-dev**) Bump pytest-cov from 2.10.1 to 2.11.1 (#49)
- (**deps-dev**) Bump time-machine from 1.3.0 to 2.0.1 (#48)
- (**deps**) Bump peter-evans/create-pull-request from v3.6.0 to v3.8.0 (#51)
- Bump Python dev version to 3.9.2 (#57)
- (**deps**) Bump actions/cache from v2.1.3 to v2.1.4 (#55)
- (**deps**) Bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (#54)
- (**deps**) Bump peter-evans/create-pull-request from v3.8.0 to v3.8.2 (#56)
- Update to Python 3.9.4 (#59)
- (**deps**) Bump actions/setup-python from v2.2.1 to v2.2.2 (#60)
- (**deps**) Bump actions/cache from v2.1.4 to v2.1.5 (#61)
- (**deps**) Bump pre-commit/action from v2.0.0 to v2.0.3 (#62)
- Update Python dev version to 3.9.5 (#65)
playpauseandstop added a commit that referenced this issue May 12, 2021
Now `badabump` escapes backticks in release notes, which allows to put
code blocks in GitHub Releases description, using standard Markdown syntax,

```python
def new_release() -> str:
    return "It is working!"
```

Features:
---------

- [#34] Put refactor commits into separate section (#58)

Fixes:
------

- [#64] Support pre-releases with multiple digits (#66)
- [#63] Escape backticks when setting output at GitHub Actions (#67)

Other:
------

- (**deps-dev**) Bump coverage from 5.3.1 to 5.4 (#47)
- (**deps-dev**) Bump pytest from 6.2.1 to 6.2.2 (#50)
- (**deps-dev**) Bump pytest-cov from 2.10.1 to 2.11.1 (#49)
- (**deps-dev**) Bump time-machine from 1.3.0 to 2.0.1 (#48)
- (**deps**) Bump peter-evans/create-pull-request from v3.6.0 to v3.8.0 (#51)
- Bump Python dev version to 3.9.2 (#57)
- (**deps**) Bump actions/cache from v2.1.3 to v2.1.4 (#55)
- (**deps**) Bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (#54)
- (**deps**) Bump peter-evans/create-pull-request from v3.8.0 to v3.8.2 (#56)
- Update to Python 3.9.4 (#59)
- (**deps**) Bump actions/setup-python from v2.2.1 to v2.2.2 (#60)
- (**deps**) Bump actions/cache from v2.1.4 to v2.1.5 (#61)
- (**deps**) Bump pre-commit/action from v2.0.0 to v2.0.3 (#62)
- Update Python dev version to 3.9.5 (#65)

Co-authored-by: playpauseandstop <playpauseandstop@users.noreply.github.com>
badabump-release-bot bot pushed a commit that referenced this issue May 12, 2021
Features:
---------

- [#34] Put refactor commits into separate section (#58)

Fixes:
------

- [#64] Support pre-releases with multiple digits (#66)
- [#63] Escape backticks when setting output at GitHub Actions (#67)
- [#63] Do not escape backticks & shell vars (#70)

Other:
------

- (**deps-dev**) Bump coverage from 5.3.1 to 5.4 (#47)
- (**deps-dev**) Bump pytest from 6.2.1 to 6.2.2 (#50)
- (**deps-dev**) Bump pytest-cov from 2.10.1 to 2.11.1 (#49)
- (**deps-dev**) Bump time-machine from 1.3.0 to 2.0.1 (#48)
- (**deps**) Bump peter-evans/create-pull-request from v3.6.0 to v3.8.0 (#51)
- Bump Python dev version to 3.9.2 (#57)
- (**deps**) Bump actions/cache from v2.1.3 to v2.1.4 (#55)
- (**deps**) Bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (#54)
- (**deps**) Bump peter-evans/create-pull-request from v3.8.0 to v3.8.2 (#56)
- Update to Python 3.9.4 (#59)
- (**deps**) Bump actions/setup-python from v2.2.1 to v2.2.2 (#60)
- (**deps**) Bump actions/cache from v2.1.4 to v2.1.5 (#61)
- (**deps**) Bump pre-commit/action from v2.0.0 to v2.0.3 (#62)
- Update Python dev version to 3.9.5 (#65)
- 21.2.0 Release (#68)
- 21.2.0 Release (#68) (#69)
playpauseandstop added a commit that referenced this issue May 12, 2021
Now `badabump` supports backticks in release notes, which allows to put code
blocks in GitHub Releases description, using standard Markdown syntax,

```python
def new_release() -> str:
    return "It is working!"
```

Features:
---------

- [#34] Put refactor commits into separate section (#58)

Fixes:
------

- [#64] Support pre-releases with multiple digits (#66)
- [#63] Escape backticks when setting output at GitHub Actions (#67)
- [#63] Do not escape backticks & shell vars (#70)

Other:
------

- (**deps-dev**) Bump coverage from 5.3.1 to 5.4 (#47)
- (**deps-dev**) Bump pytest from 6.2.1 to 6.2.2 (#50)
- (**deps-dev**) Bump pytest-cov from 2.10.1 to 2.11.1 (#49)
- (**deps-dev**) Bump time-machine from 1.3.0 to 2.0.1 (#48)
- (**deps**) Bump peter-evans/create-pull-request from v3.6.0 to v3.8.0 (#51)
- Bump Python dev version to 3.9.2 (#57)
- (**deps**) Bump actions/cache from v2.1.3 to v2.1.4 (#55)
- (**deps**) Bump pypa/gh-action-pypi-publish from v1.4.1 to v1.4.2 (#54)
- (**deps**) Bump peter-evans/create-pull-request from v3.8.0 to v3.8.2 (#56)
- Update to Python 3.9.4 (#59)
- (**deps**) Bump actions/setup-python from v2.2.1 to v2.2.2 (#60)
- (**deps**) Bump actions/cache from v2.1.4 to v2.1.5 (#61)
- (**deps**) Bump pre-commit/action from v2.0.0 to v2.0.3 (#62)
- Update Python dev version to 3.9.5 (#65)

Co-authored-by: playpauseandstop <playpauseandstop@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant