File tree 2 files changed +27
-2
lines changed
2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,14 @@ vendor:
26
26
go mod vendor
27
27
28
28
codegen :
29
- protoc -I pkg/api/ -I${GOPATH} /src --go_out=plugins=grpc:pkg/api pkg/api/* .proto
30
- protoc -I pkg/api/grpc_health_v1 -I${GOPATH} /src --go_out=plugins=grpc:pkg/api/grpc_health_v1 pkg/api/grpc_health_v1/* .proto
29
+ protoc -I pkg/api/ --go_out=plugins=grpc:pkg/api pkg/api/* .proto
30
+ protoc -I pkg/api/grpc_health_v1 --go_out=plugins=grpc:pkg/api/grpc_health_v1 pkg/api/grpc_health_v1/* .proto
31
+
32
+ container-codegen :
33
+ docker build -t operator-registry:codegen -f codegen.Dockerfile .
34
+ docker run --name temp-codegen operator-registry:codegen /bin/true
35
+ docker cp temp-codegen:/codegen/pkg/api/. ./pkg/api
36
+ docker rm temp-codegen
31
37
32
38
clean :
33
39
@rm -rf ./bin
Original file line number Diff line number Diff line change
1
+ FROM golang:1.11-alpine
2
+
3
+ RUN apk update && \
4
+ apk add make git protobuf
5
+
6
+ ENV MODULE github.com/golang/protobuf
7
+ ENV SRC ${GOPATH}/src/${MODULE}
8
+ COPY vendor/${MODULE} ${SRC}
9
+ RUN echo $(ls ${SRC})
10
+ RUN go install ${SRC}/proto ${SRC}/ptypes ${SRC}/protoc-gen-go
11
+
12
+
13
+ WORKDIR /codegen
14
+
15
+ COPY pkg pkg
16
+ COPY Makefile Makefile
17
+ RUN make codegen
18
+
19
+ LABEL maintainer="Odin Team <aos-odin@redhat.com>"
You can’t perform that action at this time.
0 commit comments