Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update makefile update-proto #1497

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ $(GOTOOLS_BINDIR)/zeitgeist:
clean:
rm -rf target/

update-proto:
go install capnproto.org/go/capnp/v3/capnpc-go@latest
cat $(PROTO_PATH)/go-patch >> $(PROTO_PATH)/conmon.capnp
.INTERMEDIATE: internal/proto/conmon.capnp
internal/proto/conmon.capnp:
cat $(PROTO_PATH)/conmon.capnp $(PROTO_PATH)/go-patch > $@

update-proto: internal/proto/conmon.capnp
$(eval GO_CAPNP_VERSION ?= $(shell grep '^\s*capnproto.org/go/capnp/v3 v3\.' go.mod | grep -o 'v3\..*'))
go install capnproto.org/go/capnp/v3/capnpc-go@$(GO_CAPNP_VERSION)
capnp compile \
-I$$GOPATH/src/capnproto.org/go/capnp/std \
-ogo $(PROTO_PATH)/conmon.capnp
mv $(PROTO_PATH)/conmon.capnp.go internal/proto/
git checkout $(PROTO_PATH)/conmon.capnp
-I$(shell go env GOMODCACHE)/capnproto.org/go/capnp/v3@$(GO_CAPNP_VERSION)/std \
-ogo internal/proto/conmon.capnp

.PHONY: lint lint-go lint-rust clean unit integration update-proto

Expand Down
Loading