Add node.js gen scripts

This commit is contained in:
Nex
2020-03-14 21:48:59 +08:00
parent cfe8dd42e3
commit 45081f759e
7 changed files with 36 additions and 6 deletions

19
scripts/gen-go.bat Normal file
View File

@@ -0,0 +1,19 @@
@echo off
cd /d "%~dp0.."
set dir=.\gen\go
set exe=protoc
set gen=protoc-gen-go
if defined GOPATH set PATH=%PATH%;%GOPATH%\bin
where /q %exe% || echo missing %exe% && exit /B
where /q %gen% || echo missing %gen% && exit /B
if not exist %dir% mkdir %dir%
%exe% -I . --go_out=plugins=grpc:%dir% bdledger/api/common.proto
%exe% -I . --go_out=plugins=grpc:%dir% bdledger/api/error_details.proto
%exe% -I . --go_out=plugins=grpc:%dir% bdledger/api/node.proto
%exe% -I . --go_out=plugins=grpc:%dir% bdledger/api/ledger.proto
%exe% -I . --go_out=plugins=grpc:%dir% bdledger/api/query.proto
echo all done