diff --git a/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/BuildCommand.cs b/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/BuildCommand.cs index 8d0a6967e8ca..04729f37996b 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/BuildCommand.cs +++ b/tools/Google.Cloud.Tools.ReleaseManager/ContainerCommands/BuildCommand.cs @@ -125,7 +125,7 @@ private int BuildUnconfigured(Dictionary options, string generat FileName = "/usr/bin/dotnet", WorkingDirectory = apiRoot }; - var processArguments = new List { "dotnet", relativeDirectory }; + var processArguments = new List { "build", relativeDirectory }; processArguments.ForEach(psi.ArgumentList.Add); var process = Process.Start(psi)!; diff --git a/tools/Google.Cloud.Tools.ReleaseManager/GenerateApisCommand.cs b/tools/Google.Cloud.Tools.ReleaseManager/GenerateApisCommand.cs index 6c37fd243567..158ce8587f2d 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/GenerateApisCommand.cs +++ b/tools/Google.Cloud.Tools.ReleaseManager/GenerateApisCommand.cs @@ -373,6 +373,14 @@ private int ExecuteForUnconfigured(string[] args) } Directory.CreateDirectory(tempOutputDirectory); + // Extract CommonResourcesConfig.json from this assembly, and dump it in the temp output directory. + // This isn't great, but it's the only way of generating unconfigured without causing other problems. + using (var commonResourcesInput = typeof(GenerateApisCommand).Assembly.GetManifestResourceStream("Google.Cloud.Tools.ReleaseManager.CommonResourcesConfig.json")) + { + using var commonResourcesOutput = File.Create(Path.Combine(tempOutputDirectory, "CommonResourcesConfig.json")); + commonResourcesInput.CopyTo(commonResourcesOutput); + } + foreach (var arg in args) { GenerateUnconfigured(arg); @@ -500,10 +508,7 @@ private void GenerateUnconfigured(string arg) yield return ("transport", "grpc"); yield return ("rest-numeric-enums", "True"); yield return ("service-config", configFiles[0]); - // We may not have a CommonResourceConfig.json file, unless we bake that into this tool or the generator image. - // It shouldn't stop anything from working; it just reduces the similarity between configured/unconfigured generation. - // TODO: Work out what to do about this. - // yield return ("common-resources-config", "CommonResourcesConfig.json"); + yield return ("common-resources-config", Path.Combine(tempOutputDirectory, "CommonResourcesConfig.json")); } } diff --git a/tools/Google.Cloud.Tools.ReleaseManager/Google.Cloud.Tools.ReleaseManager.csproj b/tools/Google.Cloud.Tools.ReleaseManager/Google.Cloud.Tools.ReleaseManager.csproj index 9d1cb8484993..e122de3f4e53 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/Google.Cloud.Tools.ReleaseManager.csproj +++ b/tools/Google.Cloud.Tools.ReleaseManager/Google.Cloud.Tools.ReleaseManager.csproj @@ -14,6 +14,7 @@ +