Skip to content

Commit

Permalink
fix path dest
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
  • Loading branch information
wagoodman committed Sep 6, 2024
1 parent 48da1e2 commit d0fe9db
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/scripts/fingerprint_docker_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit d0fe9db

Please sign in to comment.