From b6bde716887caad6cc7e3395c8ab49bd2a03ea9a Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Thu, 10 Jun 2021 12:26:24 -0400 Subject: [PATCH] chore: added Make file --- Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..500b0a0 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +SHELL:=/bin/bash +GO_BUILD_ENV=GOOS=linux GOARCH=amd64 +GO_FILES=$(shell go list ./... | grep -v /vendor/) + +BUILD_VERSION=$(shell cat VERSION) +BUILD_TAG=$(BUILD_VERSION) + +.SILENT: + +all: fmt vet install test + +build: + mkdir bin;\ + $(GO_BUILD_ENV) go build -o bin ./cmd/...;\ + + +install: + $(GO_BUILD_ENV) go install + +vet: + go vet $(GO_FILES) + +fmt: + go fmt $(GO_FILES) + +test: + go test $(GO_FILES) -cover + +integration_test: + go test -tags=integration $(GO_FILES) + +clean: + rm -rf bin-linux-and64 2> /dev/null \ No newline at end of file