diff options
Diffstat (limited to 'magefile.go')
| -rw-r--r-- | magefile.go | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/magefile.go b/magefile.go index 5e177995..4a1ce011 100644 --- a/magefile.go +++ b/magefile.go @@ -5,10 +5,12 @@ package main import ( "context" + "path/filepath" "runtime" "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" + "github.com/xlgmokha/x/pkg/x" ) // Default target to run when none is specified @@ -76,13 +78,20 @@ func Browser() error { // Generate gRPC from protocal buffers func Protos() error { - return sh.RunV( - "grpc_tools_ruby_protoc", - "--proto_path=./protos", - "--ruby_out=lib", - "--grpc_out=lib", - "protos/ability.proto", - ) + files := x.Must(filepath.Glob("./protos/*.proto")) + for _, file := range files { + if err := sh.RunV( + "grpc_tools_ruby_protoc", + "--proto_path=./protos", + "--ruby_out=lib", + "--grpc_out=lib", + file, + ); err != nil { + return err + } + } + + return nil } // Run All the servers |
