Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
batou_ext.file.SymlinkAndCleanup: add option "etag_suffix"
Given the following deployment: self += s3.Download(..., target=f"{version}.tar.gz") archive = self._.target self += SymlinkAndCleanup(target, pattern="*.tar.gz") With this, the tarballs that are neither linked by `last` or `current` are removed. However, the `.etag` files from `s3.Download` are not. Doing `pattern="*.tar.gz*"` is not an option here since this would remove ALL etag files. This means that the next deployment would download the tarball from S3 again since its etag file is missing. This patch adds an attribute called `etag_suffix` that tries to delete all files matching the glob pattern `pattern + etag_suffix` unless `pattern` is equal to the file linked by current or last. FC-41030
- Loading branch information