From 55a90a2ee0d2beeacad6afb1f2e8d43a60d08e02 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com> Date: Wed, 19 Apr 2023 12:17:07 -0400 Subject: [PATCH] fix: update cache.fingerprint file to java-builds dir (#1748) Signed-off-by: Christopher Phillips --- .github/workflows/validations.yaml | 4 ++-- Makefile | 2 +- .../pkg/cataloger/java/test-fixtures/java-builds/Makefile | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validations.yaml b/.github/workflows/validations.yaml index c019e7ee609..2ed621fa493 100644 --- a/.github/workflows/validations.yaml +++ b/.github/workflows/validations.yaml @@ -36,8 +36,8 @@ jobs: - name: Restore Java test-fixture cache uses: actions/cache@v3 with: - path: syft/pkg/cataloger/java/test-fixtures/java-builds/packages - key: ${{ runner.os }}-unit-java-cache-${{ hashFiles( 'syft/pkg/cataloger/java/test-fixtures/java-builds/packages.fingerprint' ) }} + path: syft/pkg/cataloger/java/test-fixtures/java-builds + key: ${{ runner.os }}-unit-java-cache-${{ hashFiles( 'syft/pkg/cataloger/java/test-fixtures/java-builds/cache.fingerprint' ) }} - name: Restore RPM test-fixture cache uses: actions/cache@v3 diff --git a/Makefile b/Makefile index 700d07fb440..9e027f3404f 100644 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ fingerprints: # for JAVA BUILD test fixtures cd syft/pkg/cataloger/java/test-fixtures/java-builds && \ - make packages.fingerprint + make cache.fingerprint # for GO BINARY test fixtures cd syft/pkg/cataloger/golang/test-fixtures/archs && \ diff --git a/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile b/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile index 0cac2547143..17c42ea11da 100644 --- a/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile +++ b/syft/pkg/cataloger/java/test-fixtures/java-builds/Makefile @@ -72,7 +72,7 @@ $(PKGSDIR)/gcc-amd64-darwin-exec-debug: ./build-example-macho-binary.sh $(PKGSDIR) # we need a way to determine if CI should bust the test cache based on the source material -$(PKGSDIR).fingerprint: clean-examples - mkdir -p $(PKGSDIR) - find example-* build-* Makefile -type f -exec sha256sum {} \; | sort | tee /dev/stderr | tee $(PKGSDIR).fingerprint - sha256sum $(PKGSDIR).fingerprint +.PHONY: cache.fingerprint +cache.fingerprint: + find example-* build-* Makefile -type f -exec sha256sum {} \; | sort | tee /dev/stderr | tee cache.fingerprint + sha256sum cache.fingerprint