From d0fe9db4f5f0d93d42ab091a58caeca309e7fbff Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 6 Sep 2024 10:09:49 -0400 Subject: [PATCH] fix path dest Signed-off-by: Alex Goodman --- .github/scripts/fingerprint_docker_fixtures.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/scripts/fingerprint_docker_fixtures.py b/.github/scripts/fingerprint_docker_fixtures.py index d52c85e14e9..4a74420e010 100755 --- a/.github/scripts/fingerprint_docker_fixtures.py +++ b/.github/scripts/fingerprint_docker_fixtures.py @@ -52,15 +52,18 @@ def generate_fingerprints(): for file in is_git_tracked_or_untracked(image_dir): file_path = os.path.join(image_dir, file) checksum = sha256sum(file_path) - fingerprint_file.write(f"{checksum} {file}\n") + path_from_fixture_dir = os.path.relpath(file_path, test_fixture_dir) + fingerprint_file.write(f"{checksum} {path_from_fixture_dir}\n") def find_image_dirs(test_fixture_dir): """Find all 'image-*' directories inside a given test-fixture directory.""" + result = [] for root, dirs, files in os.walk(test_fixture_dir): for dir_name in dirs: if dir_name.startswith('image-'): - yield os.path.join(root, dir_name) + result.append(os.path.join(root, dir_name)) + return sorted(result) if __name__ == "__main__":