3636 "_iam_binding",
3737 "_iam_policy",
3838 }
39+
40+ {{ if eq $.TargetVersionName `ga` -}}
41+ providerName = "google"
42+ {{- else }}
43+ providerName = "google-beta"
44+ {{- end }}
45+
3946)
4047
4148// PopulateMetadataCache walks through all metadata files once and populates
@@ -180,7 +187,7 @@ func getServicesDir() (string, error) {
180187 // Try to find project root
181188 root, err := findProjectRoot()
182189 if err == nil {
183- servicesDir := filepath .Join (root , "google-beta" , "services" )
190+ servicesDir := filepath.Join(root, providerName , "services")
184191 if _, err := os.Stat(servicesDir); err == nil {
185192 return servicesDir, nil
186193 }
@@ -194,9 +201,9 @@ func getServicesDir() (string, error) {
194201
195202 // Try a few common relative paths
196203 potentialPaths := []string{
197- filepath .Join (currentDir , "google-beta" , "services" ),
198- filepath .Join (currentDir , ".." , "google-beta" , "services" ),
199- filepath .Join (currentDir , ".." , ".." , "google-beta" , "services" ),
204+ filepath.Join(currentDir, providerName , "services"),
205+ filepath.Join(currentDir, "..", providerName , "services"),
206+ filepath.Join(currentDir, "..", "..", providerName , "services"),
200207 }
201208
202209 for _, path := range potentialPaths {
0 commit comments