Skip to content

Commit 3ea9f0c

Browse files
authored
only support mgmt. spec in sdk automation (Azure#23876)
1 parent cf7ebfa commit 3ea9f0c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

eng/tools/generator/cmd/v2/automation/automationCmd.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ func (ctx *automationContext) generate(input *pipeline.GenerateInput) (*pipeline
108108
// typespec
109109
// Generated by tsp only when tspconfig.yaml exists and has typespec-go option
110110
for _, tspProjectFolder := range input.RelatedTypeSpecProjectFolder {
111+
if !strings.Contains(tspProjectFolder, ".Management") {
112+
log.Printf("Skip processing: %s, as it is not a management plane project", tspProjectFolder)
113+
continue
114+
}
115+
111116
tspconfigPath := filepath.Join(input.SpecFolder, tspProjectFolder, "tspconfig.yaml")
112117
tsc, err := typespec.ParseTypeSpecConfig(tspconfigPath)
113118
if err != nil {
@@ -182,6 +187,11 @@ func (ctx *automationContext) generate(input *pipeline.GenerateInput) (*pipeline
182187
}
183188

184189
for _, readme := range input.RelatedReadmeMdFiles {
190+
if !strings.Contains(readme, "resource-manager") {
191+
log.Printf("Skip processing: %s, as it is not a management plane project", readme)
192+
continue
193+
}
194+
185195
log.Printf("Start to process autorest project: %s", readme)
186196

187197
sepStrs := strings.Split(readme, "/")

0 commit comments

Comments
 (0)