Skip to content

Commit 0cf7e50

Browse files
committed
change travis config script
1 parent c0cb748 commit 0cf7e50

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/bin/node-problem-detector
1+
./node-problem-detector

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ install:
1414
- cd $HOME/gopath/src/k8s.io/node-problem-detector
1515
script:
1616
- make test
17-
- go build -race
17+
- make node-problem-detector

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ PROJ = google_containers
99

1010
PKG_SOURCES := $(shell find pkg -name '*.go')
1111

12-
node-problem-detector: ./bin/node-problem-detector
12+
dep:
13+
which godep || go get github.com/tools/godep
1314

14-
./bin/node-problem-detector: $(PKG_SOURCES) node_problem_detector.go
15-
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' -o node-problem-detector
15+
node-problem-detector: $(PKG_SOURCES) node_problem_detector.go dep
16+
GOOS=linux godep go build -ldflags '-w -extldflags "-static"' -o node-problem-detector
1617

1718
test:
1819
go test -timeout=1m -v -race ./pkg/...
@@ -24,4 +25,4 @@ push: container
2425
gcloud docker push gcr.io/$(PROJ)/node-problem-detector:$(TAG)
2526

2627
clean:
27-
rm -f ./bin/node-problem-detector
28+
rm -f node-problem-detector

bin/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)