forked from kubernetes-retired/kube-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (51 loc) · 1.84 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
CALICO_BUILD?=calico/go-build
PACKAGE_NAME?=kubernetes-incubator/kube-aws
LOCAL_USER_ID?=$(shell id -u $$USER)
.PHONY: build
build:
./build
vendor: glide.yaml
rm -f glide.lock
docker run --rm \
-v $(CURDIR):/go/src/github.com/$(PACKAGE_NAME):rw \
-e LOCAL_USER_ID=$(LOCAL_USER_ID) \
-w /go/src/github.com/$(PACKAGE_NAME) \
$(CALICO_BUILD) glide install -strip-vendor
.PHONY: format
format:
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -w {} + | tee /dev/stderr)"
.PHONY: test
test: build
./make/test
.PHONY: test-with-cover
test-with-cover: build
./make/test with-cover
.PHONY: docs-dependencies
docs-dependencies:
if ! which gitbook; then npm install -g gitbook-cli; fi
if ! which gh-pages; then npm install -g gh-pages; fi
gitbook install
.PHONY: generate-docs
generate-docs: docs-dependencies
gitbook build
.PHONY: serve-docs
serve-docs: docs-dependencies
gitbook serve
# For publishing to the `git remote` named `mumoshu` linked to the repo url `git@github.com:mumoshu/kube-aws.git`, the env vars should be:
# REPO=mumoshu/kube-aws REMOTE=mumoshu make publish-docs
# For publishing to the `git remote` named `origin` linked to the repo url `git@github.com:kubernetes-incubator/kube-aws.git`, the env vars should be:
# REPO=kubernetes-incubator/kube-aws REMOTE=origin make publish-docs
# Or just:
# make publish-docs
.PHONY: publish-docs
publish-docs: REPO ?= kubernetes-incubator/kube-aws
publish-docs: REMOTE ?= origin
publish-docs: generate-docs
NODE_DEBUG=gh-pages gh-pages -d _book -r git@github.com:$(REPO).git -o $(REMOTE)
.PHONY: relnote
relnote:
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/google/go-github/github
go run hack/relnote.go