diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +build/ diff --git a/Makefile b/Makefile index 3290f23..ae2286a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all build lint +.PHONY: all build lint clean all: lint build @@ -6,6 +6,8 @@ lint: golint ./... build: + mkdir -p build/ + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w' -o build/gpio-webhook-server ./cmd/server + +clean: rm -rf build/ - mkdir build/ - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/gpio-webhook-server ./cmd/server