Skip to content

Commit

Permalink
update generate command
Browse files Browse the repository at this point in the history
  • Loading branch information
julieqiu committed Nov 4, 2024
1 parent 7ad87ba commit ad0fc01
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions generator/devtools/cmd/generate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ import (
)

var (
input = flag.String("input", "testdata/google/cloud/secretmanager/v1/", "path to protos to generate from")
output = flag.String("out", "output", "the path to the output directory")
language = flag.String("language", "", "the generated language")
testdata = flag.String("testdata", "testdata/", "path to testdata directory")
input = flag.String("input", "testdata/google/cloud/secretmanager/v1/", "path to protos to generate from")
output = flag.String("out", "output", "the path to the output directory")
language = flag.String("language", "", "the generated language")
testdata = flag.String("testdata", "testdata/", "path to testdata directory")
serviceConfig = flag.String("service-config", "testdata/google/cloud/secretmanager/v1/secretmanager_v1.yaml", "path to service config")
)

func main() {
Expand Down Expand Up @@ -59,7 +60,7 @@ func run(language, testdata, input, output string) error {
args := []string{
"-I", testdata,
fmt.Sprintf("--gclient_out=%s", output),
fmt.Sprintf("--gclient_opt=language=%s", language),
fmt.Sprintf("--gclient_opt=language=%s,service-config=%s", language, *serviceConfig),
}
args = append(args, files...)

Expand Down

0 comments on commit ad0fc01

Please sign in to comment.