Skip to content

Commit

Permalink
chore(deps): update dependency semver to v3 (#730)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency semver to v3
  • Loading branch information
renovate[bot] authored Apr 25, 2023
1 parent 028cb8f commit 3152c56
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ flake8-bugbear = '^23.2.13'
flake8-builtins = '^2.1.0'
flake8-comprehensions = '^3.10.1'
twine = '^4.0.2'
semver = '^2.13.0'
semver = '^3.0.0'
setuptools-scm = '^7.1.0'
debugpy = '^1.6.6'

Expand Down
5 changes: 3 additions & 2 deletions tasks/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def release(ctx, dry_run=True, version=None):
"""
Build and publish package to pypi index based on scm version
"""
from semver import parse_version_info
from semver.version import Version

if not dry_run and not os.environ.get("CI"):
print("This is a CI only command")
Expand All @@ -72,7 +72,8 @@ def release(ctx, dry_run=True, version=None):
exit(1)

try:
should_publish_to_pypi = not dry_run and parse_version_info(version)
Version.parse(version)
should_publish_to_pypi = not dry_run
except ValueError:
should_publish_to_pypi = False

Expand Down

0 comments on commit 3152c56

Please sign in to comment.