Skip to content

Commit

Permalink
Sort versions and define that versions < 3000 can have a .0
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <[email protected]>
  • Loading branch information
s0undt3ch committed Jun 7, 2023
1 parent 3bb2a13 commit 7a6de00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/saltrewrite/salt/fix_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _handle_convert_version_names_to_numbers_match(match):
else:
versions.add(_vs)
parsed_versions = []
for version in versions:
for version in sorted(versions):
try:
version = SaltStackVersion.from_name(version).string
except ValueError:
Expand Down Expand Up @@ -531,6 +531,8 @@ def can_have_dot_zero(self, major):
"""
determine if using new versioning scheme
"""
if int(major) < 3000:
return True
return bool(int(major) >= 3006 and int(major) < VERSION_LIMIT)

@classmethod
Expand Down

0 comments on commit 7a6de00

Please sign in to comment.