mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
Port to go-make (#4923)
* port to go-make Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * refresh fixtures on running unit tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * address refresh cache issues with old now-gitignored files Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -15,11 +15,15 @@ fixtures: build
|
||||
# requirement 2: 'fingerprint' goal to determine if the fixture input that indicates any existing cache should be busted
|
||||
fingerprint: $(FINGERPRINT_FILE)
|
||||
|
||||
tools-check:
|
||||
@sha256sum -c Dockerfile.sha256 || (echo "Tools Dockerfile has changed" && exit 1)
|
||||
|
||||
tools:
|
||||
@(docker image inspect $(TOOL_IMAGE) > /dev/null 2>&1 && make tools-check) || (docker build --platform linux/amd64 -t $(TOOL_IMAGE) . && sha256sum Dockerfile > Dockerfile.sha256)
|
||||
@if docker image inspect $(TOOL_IMAGE) > /dev/null 2>&1 \
|
||||
&& test -f Dockerfile.sha256 \
|
||||
&& sha256sum --quiet -c Dockerfile.sha256 2>/dev/null; then \
|
||||
: ; \
|
||||
else \
|
||||
docker build --platform linux/amd64 -t $(TOOL_IMAGE) . \
|
||||
&& sha256sum Dockerfile > Dockerfile.sha256; \
|
||||
fi
|
||||
|
||||
build: tools
|
||||
@mkdir -p $(BIN)
|
||||
@@ -38,4 +42,4 @@ $(FINGERPRINT_FILE):
|
||||
clean:
|
||||
rm -rf $(BIN) Dockerfile.sha256 $(VERIFY_FILE) $(FINGERPRINT_FILE)
|
||||
|
||||
.PHONY: tools tools-check build debug clean
|
||||
.PHONY: tools build debug clean
|
||||
|
||||
Reference in New Issue
Block a user