Skip to content
Permalink
Browse files
fix(internal): fix googleapis-disco regen (#4354)
  • Loading branch information
noahdietz committed Jun 30, 2021
1 parent cfee361 commit aeea1ce1e5dff3acdfe208932327b52c49851b41
Showing with 10 additions and 2 deletions.
  1. +10 −2 internal/gapicgen/generator/gapics.go
@@ -491,7 +491,11 @@ func (g *GapicGenerator) manifest(confs []*microgenConfig) error {
entries[manual.DistributionName] = manual
}
for _, conf := range confs {
yamlPath := filepath.Join(g.googleapisDir, conf.apiServiceConfigPath)
dir := g.googleapisDir
if conf.googleapisDiscovery {
dir = g.googleapisDiscoDir
}
yamlPath := filepath.Join(dir, conf.apiServiceConfigPath)
yamlFile, err := os.Open(yamlPath)
if err != nil {
return err
@@ -535,7 +539,11 @@ func (g *GapicGenerator) copyMicrogenFiles() error {
func (g *GapicGenerator) parseAPIShortnames(confs []*microgenConfig, manualEntries []manifestEntry) (map[string]string, error) {
shortnames := map[string]string{}
for _, conf := range confs {
yamlPath := filepath.Join(g.googleapisDir, conf.apiServiceConfigPath)
dir := g.googleapisDir
if conf.googleapisDiscovery {
dir = g.googleapisDiscoDir
}
yamlPath := filepath.Join(dir, conf.apiServiceConfigPath)
yamlFile, err := os.Open(yamlPath)
if err != nil {
return nil, err

0 comments on commit aeea1ce

Please sign in to comment.