-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
64 lines (45 loc) · 1.29 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CC=go
CFLAGS?=-i
GOOS=linux
CGO_ENABLED?=0
NAME=kube-sync
$(NAME):
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) $(CC) build $(CFLAGS) -o $@
clean:
$(RM) $(NAME) $(NAME).sha512sum
re: clean $(NAME)
gofmt:
./scripts/update/gofmt.sh
docs:
$(CC) run ./scripts/update/docs.go
license:
./scripts/update/license.sh
check:
$(CC) test -v ./pkg/...
verify-gofmt:
./scripts/verify/gofmt.sh
verify-docs:
./scripts/verify/docs.sh
verify-license:
./scripts/verify/license.sh
# Private targets
PKG=.cmd .docs .pkg .scripts
$(PKG): %:
@# remove the leading '.'
ineffassign $(subst .,,$@)
golint -set_exit_status $(subst .,,$@)/...
misspell -error $(subst .,,$@)
verify-misc: goget $(PKG)
verify: verify-misc verify-gofmt verify-docs verify-license
goget:
@which ineffassign || go get github.com/gordonklaus/ineffassign
@which golint || go get golang.org/x/lint/golint
@which misspell || go get github.com/client9/misspell/cmd/misspell
sha512sum: $(NAME)
$@ ./$^ > $^.$@
$(NAME)-docker:
docker run --rm --net=host -v $(PWD):/go/src/github.com/JulienBalestra/kube-sync -w /go/src/github.com/JulienBalestra/kube-sync golang:1.10 make
ci-e2e:
./.ci/e2e.sh
# Everything but the $(NAME) target
.PHONY: clean re gofmt docs license check verify-gofmt verify-docs verify-license verify-misc verify sha512sum goget