-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·42 lines (26 loc) · 1.22 KB
/
build.sh
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
#!/bin/sh
# Builds the go stubs from the protobuf files and places them in their directories
# Temporary solution until ci/cd is enabled
protoc --proto_path=. --go_out=plugins=grpc:go --go_opt=paths=source_relative proto/*.proto
mv go/proto/ProjectAPI.pb.go go/api
mv go/proto/ProjectModels.pb.go go/projectmodels
mv go/proto/ProjectEntryModels.pb.go go/projectmodels
mv go/proto/DatasetEntryModels.pb.go go/datasetentrymodels
mv go/proto/DatasetAPIModels.pb.go go/datasetapimodels
mv go/proto/DatasetAPI.pb.go go/api
mv go/proto/LoadModels.pb.go go/loadmodels
mv go/proto/LoadAPI.pb.go go/api
mv go/proto/MetadataModels.pb.go go/metadatamodels
mv go/proto/MetadataAPI.pb.go go/api
mv go/proto/AuthModels.pb.go go/authmodels
mv go/proto/AuthAPI.pb.go go/api
mv go/proto/CommonModels.pb.go go/commonmodels
protoc -I. --grpc-gateway_out=logtostderr=true,paths=source_relative:./go/api proto/*API.proto
mv ./go/api/proto/*.pb.gw.go ./go/api
rm -r ./go/api/proto
protoc -I. --swagger_out=logtostderr=true,allow_merge=true:./go/swaggerhandler proto/*API.proto
go generate go/swaggerhandler/SwaggerGen.go
grpc_tools_ruby_protoc -I. --ruby_out=ruby --grpc_out=ruby proto/*.proto
mv ruby/proto/* ruby/lib
rm -r ruby/proto
rm -r go/proto