Skip to content

yasinsaee/shop-proto-definitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

$protoRoot = Join-Path (Get-Location) "proto"
$serviceProtoRoot = Join-Path $protoRoot "user-service" #inventory-service and .....

$protoFiles = Get-ChildItem -Recurse -Path $serviceProtoRoot -Filter *.proto

foreach ($file in $protoFiles) {
    $relativePath = $file.FullName.Substring($protoRoot.Length + 1) -replace '\\','/'

    protoc -I="$protoRoot" `
           --go_out=. --go_opt=paths=source_relative `
           --go-grpc_out=. --go-grpc_opt=paths=source_relative "$relativePath"
}



#without filter


$protoRoot = Join-Path (Get-Location) "proto"
$protoFiles = Get-ChildItem -Recurse -Path $protoRoot -Filter *.proto

foreach ($file in $protoFiles) {
    # مسیر نسبی نسبت به فولدر proto و با اسلش درست
    $relativePath = $file.FullName.Substring($protoRoot.Length + 1) -replace '\\','/'

    protoc -I="$protoRoot" `
           --go_out=. --go_opt=paths=source_relative `
           --go-grpc_out=. --go-grpc_opt=paths=source_relative "$relativePath"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published