forked from ericchiang/k8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 1.39 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
KUBE_VERSION=1.13.2
build:
go build -v ./...
test:
go test -v ./...
test-examples:
@for example in $(shell find examples/ -name '*.go'); do \
go build -v $$example || exit 1; \
done
.PHONY: generate
generate: _output/kubernetes _output/bin/protoc _output/bin/gomvpkg _output/bin/protoc-gen-gofast _output/src/github.com/golang/protobuf
GO111MODULE=off ./scripts/generate.sh
GO111MODULE=off go run scripts/register.go
cp scripts/json.go.partial apis/meta/v1/json.go
.PHONY: verify-generate
verify-generate: generate
./scripts/git-diff.sh
_output/bin/protoc-gen-gofast:
GO111MODULE=off ./scripts/go-install.sh \
https://github.com/gogo/protobuf \
github.com/gogo/protobuf \
github.com/gogo/protobuf/protoc-gen-gofast \
tags/v0.5
_output/bin/gomvpkg:
GO111MODULE=off ./scripts/go-install.sh \
https://github.com/golang/tools \
golang.org/x/tools \
golang.org/x/tools/cmd/gomvpkg \
fbec762f837dc349b73d1eaa820552e2ad177942
_output/src/github.com/golang/protobuf:
git clone https://github.com/golang/protobuf _output/src/github.com/golang/protobuf
_output/bin/protoc:
./scripts/get-protoc.sh
_output/kubernetes:
mkdir -p _output
curl -o _output/kubernetes.zip -L https://github.com/kubernetes/kubernetes/archive/v$(KUBE_VERSION).zip
bsdtar -x -f _output/kubernetes.zip -C _output > /dev/null
mv _output/kubernetes-$(KUBE_VERSION) _output/kubernetes
.PHONY: clean
clean:
rm -rf _output