Skip to content

Commit

Permalink
Merge pull request #53 from andyxning/add_fmt_and_vet_make_target
Browse files Browse the repository at this point in the history
add fmt and vet make target
  • Loading branch information
Random-Liu authored Dec 22, 2016
2 parents ec46587 + bb48848 commit 750c292
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all container push clean node-problem-detector
.PHONY: all container push clean node-problem-detector vet fmt

all: push

Expand All @@ -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:
Expand Down

0 comments on commit 750c292

Please sign in to comment.