fix: builder fix
This commit is contained in:
parent
882a30027e
commit
48d3dcb526
1 changed files with 4 additions and 2 deletions
|
|
@ -421,6 +421,7 @@ func generateServiceFiles(rootDir, generatorDir string) error {
|
|||
continue
|
||||
}
|
||||
|
||||
// TODO: use const of supported versions
|
||||
if svcVersion.Name() != "alpha" && svcVersion.Name() != "beta" {
|
||||
continue
|
||||
}
|
||||
|
|
@ -452,7 +453,8 @@ func generateServiceFiles(rootDir, generatorDir string) error {
|
|||
)
|
||||
|
||||
//for _, part := range []string{"alpha", "beta"} {
|
||||
oasFile := path.Join(generatorDir, "oas", fmt.Sprintf("%s%s.json", service.Name(), svcVersion))
|
||||
oasFile := path.Join(generatorDir, "oas", fmt.Sprintf("%s%s.json", service.Name(), svcVersion.Name()))
|
||||
// slog.Info("oas file", "path", oasFile, "version", svcVersion.Name())
|
||||
if _, err = os.Stat(oasFile); !os.IsNotExist(err) {
|
||||
slog.Info("found matching oas", "svc", service.Name(), "version", svcVersion.Name())
|
||||
scName := fmt.Sprintf("%s%s", service.Name(), svcVersion.Name())
|
||||
|
|
@ -472,7 +474,7 @@ func generateServiceFiles(rootDir, generatorDir string) error {
|
|||
"tfplugingen-openapi",
|
||||
"generate",
|
||||
"--config",
|
||||
path.Join(rootDir, "service_specs", fileName),
|
||||
path.Join(rootDir, "service_specs", service.Name(), svcVersion.Name(), fileName),
|
||||
"--output",
|
||||
specJsonFile,
|
||||
oasFile,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue