-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
39 lines (31 loc) · 860 Bytes
/
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
ifndef APIVER
APIVER=$(shell cat api.swagger.json | jq -r '.info.version')
endif
all: docker-proto
clean:
$(MAKE) -C sdk clean
docker-proto:
docker run \
--privileged \
-v $(shell pwd):/go/src/github.com/libopenstorage/openstorage \
-e "GOPATH=/go" \
-e "APIVER=$(APIVER)" \
-e "DOCKER_PROTO=yes" \
-e "PATH=/bin:/usr/bin:/usr/local/bin:/go/bin" \
quay.io/openstorage/osd-proto-clients \
make proto
container:
docker build -t quay.io/openstorage/osd-proto-clients -f Dockerfile.proto .
proto:
ifndef DOCKER_PROTO
$(error Do not run directly. Run 'make docker-proto' instead.)
endif
curl https://raw.githubusercontent.com/libopenstorage/openstorage/master/api/api.proto \
--output api.proto --silent
@echo "Generating protobuf definitions from api.proto"
$(MAKE) -C sdk
rm -f api.proto
.PHONY: \
all \
docker-proto \
proto