-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1.32 KB
/
Makefile
File metadata and controls
40 lines (30 loc) · 1.32 KB
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
FIXTURES=fixtures/today.proto
TAG?=$(shell git rev-parse --short HEAD)
protobuf-tools = @docker run --rm -v `pwd`:/proto-sources:ro -w /proto-sources brennovich/protobuf-tools:$(TAG)
test/python:
@echo "Building for python..."
$(protobuf-tools) protoc --python_out=/tmp ${FIXTURES}
test/java:
@echo "Building for java..."
$(protobuf-tools) protoc --java_out=/tmp ${FIXTURES}
test/go:
@echo "Building for go..."
$(protobuf-tools) protowrap -I . --go_out=/tmp ./${FIXTURES}
test/scala:
@echo "Building for scala..."
$(protobuf-tools) scalapbc --scala_out=flat_package:/tmp --proto_path /usr/local/include --proto_path fixtures ${FIXTURES}
test/js:
@echo "Building for javascript..."
$(protobuf-tools) protoc --js_out=/tmp ${FIXTURES}
test/index.html: ${FIXTURES}
@echo "Creating docs..."
$(protobuf-tools) protoc --doc_out=html,index.html:/tmp ${FIXTURES}
test: docker/build test/go test/java test/scala test/python test/js test/index.html
docker/build:
docker build --tag brennovich/protobuf-tools:$(TAG) .
docker/release: docker/build
git tag v$(RELEASE) && git push --tags
docker tag brennovich/protobuf-tools:$(TAG) brennovich/protobuf-tools:latest
docker tag brennovich/protobuf-tools:$(TAG) brennovich/protobuf-tools:$(RELEASE)
docker push brennovich/protobuf-tools:$(RELEASE)
docker push brennovich/protobuf-tools:latest