mirror of
https://github.com/anchore/syft
synced 2024-11-09 22:04:22 +00:00
0a3f513f92
* slim down docker cache size Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove old centos images Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * troubleshoot test failure Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix wget version ref Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * refactor caching mechanisms Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add cache cleanup steps Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * simplify deleting cache Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix first clone issue Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * add tool dep Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
OWNER = anchore
|
|
PROJECT = syft
|
|
|
|
TOOL_DIR = .tool
|
|
BINNY = $(TOOL_DIR)/binny
|
|
TASK = $(TOOL_DIR)/task
|
|
|
|
.DEFAULT_GOAL := make-default
|
|
|
|
## Bootstrapping targets #################################
|
|
|
|
# note: we need to assume that binny and task have not already been installed
|
|
$(BINNY):
|
|
@mkdir -p $(TOOL_DIR)
|
|
@curl -sSfL https://raw.githubusercontent.com/$(OWNER)/binny/main/install.sh | sh -s -- -b $(TOOL_DIR)
|
|
|
|
# note: we need to assume that binny and task have not already been installed
|
|
.PHONY: task
|
|
$(TASK) task: $(BINNY)
|
|
@$(BINNY) install task -q
|
|
|
|
.PHONY: ci-bootstrap-go
|
|
ci-bootstrap-go:
|
|
go mod download
|
|
|
|
# this is a bootstrapping catch-all, where if the target doesn't exist, we'll ensure the tools are installed and then try again
|
|
%:
|
|
@make --silent $(TASK)
|
|
@$(TASK) $@
|
|
|
|
## Shim targets #################################
|
|
|
|
.PHONY: make-default
|
|
make-default: $(TASK)
|
|
@# run the default task in the taskfile
|
|
@$(TASK)
|
|
|
|
# for those of us that can't seem to kick the habit of typing `make ...` lets wrap the superior `task` tool
|
|
TASKS := $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep '^\* ' | cut -d' ' -f2 | tr -d ':' | tr '\n' ' '" ) $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep 'aliases:' | cut -d ':' -f 3 | tr '\n' ' ' | tr -d ','")
|
|
|
|
.PHONY: $(TASKS)
|
|
$(TASKS): $(TASK)
|
|
@$(TASK) $@
|
|
|
|
help: $(TASK)
|
|
@$(TASK) -l
|