Skip to content

Commit

Permalink
Merge pull request #214 from binjip978/explore-rabbit-hole
Browse files Browse the repository at this point in the history
move to google.golang.org/protobuf
  • Loading branch information
Sergei Semenchuk authored Aug 27, 2021
2 parents 6d32eb4 + f4385bd commit 5a299f1
Show file tree
Hide file tree
Showing 40 changed files with 12,798 additions and 7,204 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ trigger-travis.sh
# IDE-specific settings files
.idea

/protoc-gen-gorm
/protoc-gen-gorm
42 changes: 40 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,44 @@ generate-gentool: #gentool
--go_out="plugins=grpc:$(DOCKERPATH)" \
--gorm_out="engine=postgres,enums=string,gateway:$(DOCKERPATH)" \
feature_demo/demo_multi_file.proto \
feature_demo/demo_types.proto \
feature_demo/demo_multi_file_service.proto \
feature_demo/demo_service.proto \
feature_demo/demo_multi_file_service.proto
feature_demo/demo_types.proto
$(DOCKER_RUNNER) \
$(GENTOOL_IMAGE) \
--go_out="plugins=grpc:$(DOCKERPATH)" \
--gorm_out="engine=postgres,enums=string,gateway:$(DOCKERPATH)" \
user/user.proto
$(DOCKER_RUNNER) \
$(GENTOOL_IMAGE) \
--go_out="plugins=grpc:$(DOCKERPATH)" \
--gorm_out="engine=postgres,enums=string,gateway:$(DOCKERPATH)" \
postgres_arrays/postgres_arrays.proto

build-local:
rm -rf example/feature_demo/github.com/
rm -rf example/feature_demo/google.golang.org
go install
protoc --proto_path . \
-I./proto/ \
-I./third_party/proto/ \
-I=. example/feature_demo/demo_multi_file.proto \
example/feature_demo/demo_service.proto --gorm_out="engine=postgres,enums=string,gateway:./example/feature_demo" --go_out=./example/feature_demo

build-user-local:
rm -rf example/user/github.com/
rm -rf example/user/google.golang.org
go install
protoc --proto_path . \
-I./proto/ \
-I./third_party/proto/ \
example/user/user.proto --gorm_out="engine=postgres,enums=string,gateway:./example/user" --go_out=./example/user

build-postgres-local:
rm -rf example/postgres_arrays/github.com/
rm -rf example/postgres_arrays/google.golang.org
go install
protoc --proto_path . \
-I./proto/ \
-I./third_party/proto/ \
example/postgres_arrays/postgres_arrays.proto --gorm_out="engine=postgres,enums=string,gateway:./example/postgres_arrays" --go_out=./example/postgres_arrays
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /go/src/github.com/infobloxopen/protoc-gen-gorm
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /out/usr/bin/protoc-gen-gorm main.go

FROM infoblox/atlas-gentool:v19.1 AS runner
FROM infoblox/atlas-gentool:v24.0 AS runner

COPY --from=builder /out/usr/bin/protoc-gen-gorm /usr/bin/protoc-gen-gorm
COPY --from=builder /go/src/github.com/infobloxopen/protoc-gen-gorm/proto /go/src/github.com/infobloxopen/protoc-gen-gorm/proto
Expand Down
9 changes: 2 additions & 7 deletions example/feature_demo/demo_multi_file.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a299f1

Please sign in to comment.