forked from kubernetes-retired/kube-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 loc) · 1.59 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
CALICO_BUILD?=calico/go-build
PACKAGE_NAME?=kubernetes-incubator/kube-aws
LOCAL_USER_ID?=$(shell id -u $$USER)
.PHONY: build
build:
./build
.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 `[email protected]: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 `[email protected]: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 [email protected]:$(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