From e552416673946c01ba732bfcc2c4c6ef09aa8162 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Mon, 25 May 2020 20:47:48 +0000 Subject: [PATCH] Build process cleanup. --- .dockerignore | 1 + Makefile | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .dockerignore 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