changelog: update version number generation to actual usage (#41851)
This commit is contained in:
parent
39d3112069
commit
e15376e44e
|
@ -1,6 +1,7 @@
|
|||
import datetime
|
||||
import textwrap
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
import pytz
|
||||
|
@ -71,8 +72,8 @@ def changelog_from_git(project, version_suffix, path,
|
|||
continue
|
||||
version = name.lstrip('v').replace('-', '.')
|
||||
if is_pep0440:
|
||||
# pep440 limit free-style version number after a +
|
||||
version = version.replace('.g', '+g')
|
||||
# use .postX+g form
|
||||
version = re.sub('\.(\d+)\.g', r'.post\1+g', version)
|
||||
if i == 0:
|
||||
version += version_suffix
|
||||
if epoch:
|
||||
|
|
Loading…
Reference in New Issue