From 4ed09e563f2c993a3e0d072374708a461f9326eb Mon Sep 17 00:00:00 2001 From: Hagai Barel Date: Sun, 14 Oct 2018 14:26:58 +0300 Subject: [PATCH] Introduce makefile for fun and profit --- .gitignore | 2 ++ Makefile | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 1674ffa..fafe223 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ vendor/ examples/ + +bin/ \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..11c4671 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +all: test build + +fmt: + go fmt ./pkg/... ./cmd/... + +vet: + go vet ./pkg/... ./cmd/... + +# Run tests +test: fmt vet + go test ./test/... ./pkg/... -coverprofile cover.out + +# Build orca binary +build: fmt vet + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/orca cmd/orca.go \ No newline at end of file