From 49a9659e91f573b00832bf9018430698229c85d9 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Thu, 3 Aug 2023 14:29:39 +0800 Subject: [PATCH 1/2] generator tool fix --- eng/tools/generator/cmd/v2/release/releaseCmd.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/eng/tools/generator/cmd/v2/release/releaseCmd.go b/eng/tools/generator/cmd/v2/release/releaseCmd.go index 4b4a96e4d753..78a0ddb4ffb6 100644 --- a/eng/tools/generator/cmd/v2/release/releaseCmd.go +++ b/eng/tools/generator/cmd/v2/release/releaseCmd.go @@ -183,6 +183,7 @@ func (c *commandContext) generate(sdkRepo repo.SDKRepository, specCommitHash str } func (c *commandContext) generateFromRequest(sdkRepo repo.SDKRepository, specRepoParam, specCommitHash string) error { + var generateErr []error var pullRequestUrls = make(map[string]string) var pushBranch = make(map[string]struct { requestLink string @@ -220,7 +221,8 @@ func (c *commandContext) generateFromRequest(sdkRepo repo.SDKRepository, specRep } err = c.generate(sdkRepo, specCommitHash) if err != nil { - return err + generateErr = append(generateErr, err) + continue } // get current branch name @@ -289,5 +291,12 @@ func (c *commandContext) generateFromRequest(sdkRepo repo.SDKRepository, specRep } } + if len(generateErr) != 0 { + fmt.Println("generator error:") + for _, e := range generateErr { + fmt.Println(e) + } + } + return nil } From 66f6dca5cee36c6806867c999d5f257ce6bd1001 Mon Sep 17 00:00:00 2001 From: Alancere <804873052@qq.com> Date: Thu, 3 Aug 2023 15:42:17 +0800 Subject: [PATCH 2/2] fix README.md.tpl --- eng/tools/generator/template/rpName/packageName/README.md.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/tools/generator/template/rpName/packageName/README.md.tpl b/eng/tools/generator/template/rpName/packageName/README.md.tpl index a907bff3ba5a..5b1302fb2758 100644 --- a/eng/tools/generator/template/rpName/packageName/README.md.tpl +++ b/eng/tools/generator/template/rpName/packageName/README.md.tpl @@ -49,7 +49,7 @@ options := arm.ClientOptions { Cloud: cloud.AzureChina, }, } -client, err := {{packageName}}.NewClientFactory(, cred, &options) +clientFactory, err := {{packageName}}.NewClientFactory(, cred, &options) ``` ## Clients