Skip to content

Commit

Permalink
Update Makefile go target
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner committed Aug 16, 2024
1 parent 4bb4383 commit 988d183
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
all: build

GO ?= go1.22.2
GO_VERSION ?= $(shell grep '^go ' go.mod | awk '{print $$2}')
GO ?= go$(GO_VERSION)

go:
-go install golang.org/dl/$(GO)@latest
$(GO) download
rm -f $$(dirname $$(which $(GO)))/go
ln -s $$(which $(GO)) $$(dirname $$(which $(GO)))/go
go version
-go install golang.org/dl/go$(GO_VERSION)@latest
go$(GO_VERSION) download

helm:
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
Expand All @@ -21,7 +19,7 @@ build: goreleaser

.PHONY: test
test:
$(GO) test -race -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v /hack`
$(GO) test -race -coverprofile=coverage.txt -covermode=atomic `$(GO) list ./... | grep -v /hack`
$(GO) tool cover -func=coverage.txt -o=coverage.out
tail -1 coverage.out | awk '{gsub("%",""); print $$3}'

Expand Down

0 comments on commit 988d183

Please sign in to comment.