Skip to content

Commit

Permalink
Use official proto definitions from code-protobuf-api
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffyanta committed Nov 9, 2023
1 parent 8c4e53a commit 4c16711
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 584 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM golang:1.21

RUN apt-get update && apt-get install -y protobuf-compiler
RUN go install google.golang.org/protobuf/cmd/[email protected]

WORKDIR /sdk

CMD ["bash"]
13 changes: 1 addition & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
DOCKER_IMAGE = code-sdk-go:latest
PROTOC = docker run --rm -v $(PWD):/sdk $(DOCKER_IMAGE) protoc
PROTO_DIR = ./proto
PROTO_OUT_DIR = ./genproto

# Build the Docker image
docker-build:
Expand All @@ -15,12 +12,4 @@ docker-test: docker-build
test:
@go test -cover ./...

# Generate Go code from Protobuf files in Docker image
generate: docker-build
$(PROTOC) $(PROTO_DIR)/messages.proto --go_out=$(PROTO_OUT_DIR)

# Clean generated files
clean:
@rm -r $(PROTO_OUT_DIR)/*

.PHONY: docker-build docker-test test generate clean
.PHONY: docker-build docker-test test
Loading

0 comments on commit 4c16711

Please sign in to comment.