Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion artifactory_cleanup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ def register(rule):
registry.register(rule)


__version__ = "1.0.3"
__version__ = "1.0.4"
7 changes: 3 additions & 4 deletions artifactory_cleanup/rules/keep.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def filter(self, artifacts):
version_str = (
version[0][0] if isinstance(version[0], tuple) else version[0]
)
artifactory_with_version = [version_str, artifact]
artifactory_with_version = (version_str, artifact)
name_without_version = artifact["name"][
: artifact["name"].find(version_str)
]
Expand All @@ -173,9 +173,8 @@ def filter(self, artifacts):
artifacts.keep(artifact)

for artifactory_with_version in artifacts_by_path_and_name.values():
artifactory_with_version.sort(
key=lambda x: [int(x) for x in x[0].split(".")]
)
# List of pairs: [version, ArtifactDict]
artifactory_with_version.sort(key=lambda pair: pair[0])

artifact_count = len(artifactory_with_version)
good_artifact_count = artifact_count - self.count
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name="artifactory-cleanup",
version="1.0.3",
version="1.0.4",
description="Rules and cleanup policies for Artifactory",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
Loading