mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-04-19 08:57:10 +00:00
add fmt and vet make target
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: all container push clean node-problem-detector
|
||||
.PHONY: all container push clean node-problem-detector vet fmt
|
||||
|
||||
all: push
|
||||
|
||||
@@ -9,7 +9,13 @@ PROJ = google_containers
|
||||
|
||||
PKG_SOURCES := $(shell find pkg -name '*.go')
|
||||
|
||||
node-problem-detector: $(PKG_SOURCES) node_problem_detector.go
|
||||
vet:
|
||||
go list ./... | grep -v "./vendor/*" | xargs go vet
|
||||
|
||||
fmt:
|
||||
find . -type f -name "*.go" | grep -v "./vendor/*" | xargs gofmt -s -w -l
|
||||
|
||||
node-problem-detector: $(PKG_SOURCES) node_problem_detector.go fmt vet
|
||||
GOOS=linux go build -ldflags '-w -extldflags "-static"' -o node-problem-detector
|
||||
|
||||
test:
|
||||
|
||||
Reference in New Issue
Block a user