Skip to content

Commit

Permalink
Use GOMODCACHE and same capnp version in Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Michaelis <code@mgjm.de>
  • Loading branch information
mgjm committed Jul 11, 2023
1 parent 880e0b7 commit 17780b4
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 233 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ internal/proto/conmon.capnp:
cat $(PROTO_PATH)/conmon.capnp $(PROTO_PATH)/go-patch > $@

update-proto: internal/proto/conmon.capnp
go install capnproto.org/go/capnp/v3/capnpc-go@latest
$(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 \
-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

0 comments on commit 17780b4

Please sign in to comment.