summaryrefslogtreecommitdiff
path: root/magefile.go
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-03-06 11:37:01 -0700
committermo khan <mo@mokhan.ca>2025-03-06 11:37:01 -0700
commitbad76558aca0719db95f5572c7847fd971051186 (patch)
treeac04873ec207edead082cdf8dc4e304c4cde9ad0 /magefile.go
parent27e5b886ad9e9e4c0d831162dbae9d9025fb2903 (diff)
refactor: move protobuf rpc services to lib/authx/rpc
Diffstat (limited to 'magefile.go')
-rw-r--r--magefile.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/magefile.go b/magefile.go
index 23fc4af9..0e309bdd 100644
--- a/magefile.go
+++ b/magefile.go
@@ -57,8 +57,7 @@ func Api() error {
}
// Run the gRPC Server
-func Rpc(ctx context.Context) error {
- mg.CtxDeps(ctx, Protos)
+func Rpc() error {
env := map[string]string{
"PORT": "50051",
"HOST": "localhost",
@@ -79,13 +78,14 @@ func Browser() error {
// Generate gRPC from protocal buffers
func Protos() error {
files := x.Must(filepath.Glob("./protos/*.proto"))
+ outDir := "lib/authx/rpc"
for _, file := range files {
var err error
if err = sh.RunV(
"protoc",
"--proto_path=./protos",
- "--ruby_out=lib",
- "--twirp_ruby_out=lib",
+ "--ruby_out="+outDir,
+ "--twirp_ruby_out="+outDir,
file,
); err != nil {
return err
@@ -93,8 +93,8 @@ func Protos() error {
if err = sh.RunV(
"grpc_tools_ruby_protoc",
"--proto_path=./protos",
- "--ruby_out=lib",
- "--grpc_out=lib",
+ "--ruby_out="+outDir,
+ "--grpc_out="+outDir,
file,
); err != nil {
return err