mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Bring to the developer's attention that a version bump might be missing.
This commit is contained in:
parent
cc38b94621
commit
52baa13a6d
2 changed files with 18 additions and 7 deletions
|
@ -73,13 +73,24 @@ def __get_version(version, version_info):
|
|||
parsed_version_info = tuple([
|
||||
int(g) for g in match.groups()[:3] if g.isdigit()
|
||||
])
|
||||
if parsed_version_info != version_info:
|
||||
|
||||
if parsed_version_info > version_info:
|
||||
warnings.warn(
|
||||
'In order to get the proper salt version with the '
|
||||
'git hash you need to update salt\'s local git '
|
||||
'tags. Something like: \'git fetch --tags\' or '
|
||||
'\'git fetch --tags upstream\' if you followed '
|
||||
'salt\'s contribute documentation. The version '
|
||||
'The parsed version info, `{0}`, is bigger than the one '
|
||||
'defined in the file, `{1}`. Missing version bump?'.format(
|
||||
parsed_version_info,
|
||||
version_info
|
||||
),
|
||||
UserWarning,
|
||||
stacklevel=2
|
||||
)
|
||||
return version, version_info
|
||||
elif parsed_version_info < version_info:
|
||||
warnings.warn(
|
||||
'In order to get the proper salt version with the git hash '
|
||||
'you need to update salt\'s local git tags. Something like: '
|
||||
'\'git fetch --tags\' or \'git fetch --tags upstream\' if '
|
||||
'you followed salt\'s contribute documentation. The version '
|
||||
'string WILL NOT include the git hash.',
|
||||
UserWarning,
|
||||
stacklevel=2
|
||||
|
|
2
setup.py
2
setup.py
|
@ -115,7 +115,7 @@ class Clean(clean):
|
|||
|
||||
install_version_template = """\
|
||||
# This file was auto-generated by salt's setup on \
|
||||
{date:%A, %d %B %Y @ %H:%m:%S UTC}'.
|
||||
{date:%A, %d %B %Y @ %H:%m:%S UTC}.
|
||||
|
||||
__version__ = {version!r}
|
||||
__version_info__ = {version_info!r}
|
||||
|
|
Loading…
Add table
Reference in a new issue