Skip to content

Commit

Permalink
package-indexer: temporarily dry-run old nightly removal
Browse files Browse the repository at this point in the history
Signed-off-by: László Várady <laszlo.varady@anno.io>
  • Loading branch information
MrAnno committed Oct 17, 2024
1 parent 890a6f5 commit 5179c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/package-indexer/indexer/deb_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def __get_pkg_timestamps_in_dir(self, dir: Path) -> List[str]:
def __remove_pkgs_with_timestamp(self, dir: Path, timestamps_to_remove: List[str]) -> None:
for timestamp in timestamps_to_remove:
for deb_file in dir.rglob("*{}*.deb".format(timestamp)):
self._log_info("Removing old nightly package.", path=str(deb_file.resolve()))
deb_file.unlink()
self._log_info("Dry-run: removing old nightly package.", path=str(deb_file.resolve()))
# deb_file.unlink()

def __remove_old_pkgs(self, indexed_dir: Path) -> None:
platform_dirs = list(filter(lambda path: path.is_dir(), indexed_dir.glob("*")))
Expand Down

0 comments on commit 5179c02

Please sign in to comment.