mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-13 06:50:08 +01:00
more cleanup
This commit is contained in:
parent
f6f3a2fd00
commit
7febf195ae
2 changed files with 2 additions and 11 deletions
|
|
@ -12,6 +12,7 @@ Provided subcommands: show, test, init, bump
|
||||||
import typing as typ
|
import typing as typ
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import pycalver.version as v1version
|
||||||
import pycalver2.rewrite as v2rewrite
|
import pycalver2.rewrite as v2rewrite
|
||||||
import pycalver2.version as v2version
|
import pycalver2.version as v2version
|
||||||
from pycalver import config
|
from pycalver import config
|
||||||
|
|
@ -28,7 +29,7 @@ def update_cfg_from_vcs(cfg: config.Config, all_tags: typ.List[str]) -> config.C
|
||||||
version_tags.sort(reverse=True)
|
version_tags.sort(reverse=True)
|
||||||
logger.debug(f"found {len(version_tags)} tags: {version_tags[:2]}")
|
logger.debug(f"found {len(version_tags)} tags: {version_tags[:2]}")
|
||||||
latest_version_tag = version_tags[0]
|
latest_version_tag = version_tags[0]
|
||||||
latest_version_pep440 = v2version.to_pep440(latest_version_tag)
|
latest_version_pep440 = v1version.to_pep440(latest_version_tag)
|
||||||
if latest_version_tag <= cfg.current_version:
|
if latest_version_tag <= cfg.current_version:
|
||||||
return cfg
|
return cfg
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import logging
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
|
||||||
import lexid
|
import lexid
|
||||||
import pkg_resources
|
|
||||||
|
|
||||||
import pycalver2.patterns as v2patterns
|
import pycalver2.patterns as v2patterns
|
||||||
|
|
||||||
|
|
@ -637,12 +636,3 @@ def incr(
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
return new_version
|
return new_version
|
||||||
|
|
||||||
|
|
||||||
def to_pep440(version: str) -> str:
|
|
||||||
"""Derive pep440 compliant version string from PyCalVer version string.
|
|
||||||
|
|
||||||
>>> to_pep440("v201811.0007-beta")
|
|
||||||
'201811.7b0'
|
|
||||||
"""
|
|
||||||
return str(pkg_resources.parse_version(version))
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue