forked from mstump/cassandra-kubernetes-hostid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
UNAME := $(shell uname -s)
BUILD_NUMBER ?= "local"
GO_FILES := $(shell find . -type f -name '*.go' -not -path "./*vendor/*")
NAME := cassandra-kubernetes-hostid
build:
go vet -v
mkdir -p .bin/linux-amd64 .bin/darwin
#GOOS=linux GOARCH=amd64 go build -o .bin/linux-amd64/${NAME} ./
GOOS=darwin GOARCH=amd64 go build -o .bin/darwin/${NAME} ./
ifeq ($(UNAME),Linux)
cp .bin/linux-amd64/${NAME} $(GOPATH)/bin/
else
cp .bin/darwin/${NAME} $(GOPATH)/bin/
endif
test: build
go test -v github.com/k8s-for-greeks/${NAME}/pkg/... -args -v=1 -logtostderr
go test -v github.com/k8s-for-greeks/${NAME}/cmd/... -args -v=1 -logtostderr
fmt:
gofmt -w -s cmd/
gofmt -w -s pkg/
copydeps:
rsync -avz _vendor/ vendor/ --delete --exclude vendor/ --exclude .git
# --------------------------------------------------
# Continuous integration targets
verify-boilerplate:
sh -c hack/verify-boilerplate.sh
.PHONY: verify-gofmt
verify-gofmt:
hack/verify-gofmt.sh
.PHONY: verify-packages
verify-packages:
hack/verify-packages.sh
ci: kops nodeup-gocode examples test govet verify-boilerplate verify-gofmt verify-packages
echo "Done!"