mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-15 07:43:51 +01:00
add --date argument
This commit is contained in:
parent
67feeaf8ef
commit
7b06012180
4 changed files with 66 additions and 20 deletions
|
|
@ -380,6 +380,7 @@ def incr(
|
|||
patch : bool = False,
|
||||
release_num: bool = False,
|
||||
pin_date : bool = False,
|
||||
date : typ.Optional[dt.date] = None,
|
||||
) -> typ.Optional[str]:
|
||||
"""Increment version string.
|
||||
|
||||
|
|
@ -391,7 +392,7 @@ def incr(
|
|||
logger.error(str(ex))
|
||||
return None
|
||||
|
||||
cur_cinfo = _ver_to_cal_info(old_vinfo) if pin_date else cal_info()
|
||||
cur_cinfo = _ver_to_cal_info(old_vinfo) if pin_date else cal_info(date)
|
||||
|
||||
if _is_cal_gt(old_vinfo, cur_cinfo):
|
||||
logger.warning(f"Old version appears to be from the future '{old_version}'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue