From 2464945ac561df821c2c84780ff63930dfdac367 Mon Sep 17 00:00:00 2001 From: Vihang Mehta Date: Tue, 27 May 2025 16:44:32 -0700 Subject: [PATCH] Fix release action Signed-off-by: Vihang Mehta --- .gitignore | 6 ++++++ Makefile | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 40776a14..854741aa 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,9 @@ mockgen/mockgen # vendor directory used for IDEs /vendor + +# tools +/bin +# coverage files +/cover.out +/cover.html diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..94bcf855 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +BIN = bin + +export GO111MODULE=on +export GOBIN ?= $(shell pwd)/$(BIN) + +GO_FILES = $(shell find . \ + -path '*/.*' -prune -o \ + '(' -type f -a -name '*.go' ')' -print) + +EXTRACT_CHANGELOG = $(BIN)/extract-changelog + +.PHONY: all +all: build test + +.PHONY: build +build: + go build ./... + +.PHONY: test +test: + go test -v -race ./... + +.PHONY: cover +cover: + go test -race -coverprofile=cover.out -coverpkg=./... ./... + go tool cover -html=cover.out -o cover.html + +$(EXTRACT_CHANGELOG): tools/cmd/extract-changelog/main.go + cd tools && go install github.com/uber-go/mock/tools/cmd/extract-changelog