From cdd73185146c5448f519c8f4d05f93163c045490 Mon Sep 17 00:00:00 2001 From: Zach Hill Date: Fri, 6 Dec 2019 23:55:16 -0800 Subject: [PATCH] chore: Update makefile to rebuild on any source change Signed-off-by: Zach Hill --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 666ab1c..52d7d38 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ COMMIT ?= $(shell git rev-parse HEAD) +SOURCES := $(shell find . -name '*.go') BINARY := anchore-adapter IMAGE_TAG ?= dev REPOSITORY ?= anchore/harbor-scanner-adapter @@ -6,7 +7,7 @@ IMAGE ?= $(REPOSITORY):$(IMAGE_TAG) build: $(BINARY) -$(BINARY): +$(BINARY): $(SOURCES) GOOS=linux GO111MODULE=on CGO_ENABLED=0 go build -o $(BINARY) cmd/anchore-adapter/main.go .PHONY: container