Skip to content

Commit

Permalink
Fix komodo lint maturity not ignoring file extension
Browse files Browse the repository at this point in the history
The komodo lint maturity script fails when testing locally because it is not removing the file extension before checking if the release name is valid.
  • Loading branch information
jonathan-eq committed Oct 30, 2023
1 parent 2b2d0a2 commit 37f2452
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions komodo/lint_maturity.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ def msg_release_exception(release_basename, release_version):


def get_release_version(release_basename, tag_exceptions_release):
release_cleanname = release_basename.split("-")[0]

if release_cleanname not in tag_exceptions_release:
release_version = get_release_type(release_cleanname)
if release_basename not in tag_exceptions_release:
release_version = get_release_type(release_basename)
else:
release_version = "exception"

Expand All @@ -131,7 +130,7 @@ def run(files_to_lint: List[str], tag_exceptions):
system_warning_msg = ""

for file_to_lint in files_to_lint:
release_basename = os.path.basename(file_to_lint)
release_basename = ".".join(os.path.basename(file_to_lint).split(".")[0:-1])
release_version = get_release_version(
release_basename,
tag_exceptions["release"],
Expand Down

0 comments on commit 37f2452

Please sign in to comment.