This repository has been archived by the owner on May 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,469 additions
and
2 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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) 2015-2022 Lightning Labs and The Lightning Network Developers | ||
# Copyright (C) 2022 Bottlepay and The Lightning Network Developers | ||
|
||
set -e | ||
|
||
# generate compiles the *.pb.go stubs from the *.proto files. | ||
function generate() { | ||
echo "Generating root gRPC server protos" | ||
|
||
PROTOS="walletunlocker.proto" | ||
|
||
# For each of the sub-servers, we then generate their protos, but a restricted | ||
# set as they don't yet require REST proxies, or swagger docs. | ||
for file in $PROTOS; do | ||
DIRECTORY=$(dirname "${file}") | ||
echo "Generating protos from ${file}, into ${DIRECTORY}" | ||
|
||
# Generate the protos. | ||
protoc -I/usr/local/include -I. \ | ||
--go_out . --go_opt paths=source_relative \ | ||
--go-grpc_out . --go-grpc_opt paths=source_relative \ | ||
"${file}" | ||
done | ||
} | ||
|
||
# format formats the *.proto files with the clang-format utility. | ||
function format() { | ||
find . -name "*.proto" -print0 | xargs -0 clang-format --style=file -i | ||
} | ||
|
||
# Compile and format the itest package. | ||
pushd itest | ||
format | ||
generate | ||
popd |
Oops, something went wrong.