github.com/anchore/syft@v1.38.2/cmd/syft/internal/test/integration/test-fixtures/Makefile (about) 1 FINGERPRINT_FILE := cache.fingerprint 2 3 .DEFAULT_GOAL := fixtures 4 5 # requirement 1: 'fixtures' goal to generate any and all test fixtures 6 fixtures: 7 @echo "nothing to do" 8 9 # requirement 2: 'fingerprint' goal to determine if the fixture input that indicates any existing cache should be busted 10 fingerprint: $(FINGERPRINT_FILE) 11 12 # requirement 3: we always need to recalculate the fingerprint based on source regardless of any existing fingerprint 13 .PHONY: $(FINGERPRINT_FILE) 14 $(FINGERPRINT_FILE): 15 @find image-* -type f -exec sha256sum {} \; | sort -k2 > $(FINGERPRINT_FILE) 16 @#cat $(FINGERPRINT_FILE) | sha256sum | awk '{print $$1}' 17 18 # requirement 4: 'clean' goal to remove all generated test fixtures 19 .PHONY: clean 20 clean: 21 rm -f $(FINGERPRINT_FILE)