-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add makefile auto download and sed on proto
- Loading branch information
Showing
2 changed files
with
108 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -309,13 +309,24 @@ protogen_local: go_protoc-go-inject-tag ## Generate go structures for all of the | |
$(PROTOC_SHARED) -I=./p2p/types/proto --go_out=./p2p/types ./p2p/types/proto/*.proto | ||
|
||
# IBC | ||
make copy_ics23_proto | ||
$(PROTOC_SHARED) -I=./ibc/types/proto --go_out=./ibc/types ./ibc/types/proto/*.proto | ||
|
||
# echo "View generated proto files by running: make protogen_show" | ||
|
||
# CONSIDERATION: Some proto files contain unused gRPC services so we may need to add the following | ||
# if/when we decide to include it: `grpc--go-grpc_opt=paths=source_relative --go-grpc_out=./output/path` | ||
|
||
.PHONY: copy_ics23_proto | ||
copy_ics23_proto: | ||
echo "Downloading cosmos/ics23 proto definitions..." | ||
curl -s -o ./ibc/types/proto/proofs.proto https://raw.githubusercontent.com/cosmos/ics23/master/proto/cosmos/ics23/v1/proofs.proto && \ | ||
sed -i '' \ | ||
-e '/^package/{N;d;}' \ | ||
-e '[email protected]/.*"@github.com/pokt-network/ibc/types"@g' \ | ||
./ibc/types/proto/proofs.proto && \ | ||
awk 'BEGIN { print "// ===== !! THIS IS CLONED FROM cosmos/ics23 !! =====\n" } { print }' ./ibc/types/proto/proofs.proto > tmpfile && mv tmpfile ./ibc/types/proto/proofs.proto | ||
|
||
.PHONY: protogen_docker_m1 | ||
## TECHDEBT: Test, validate & update. | ||
protogen_docker_m1: docker_check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters