Skip to content

Commit 2be5591

Browse files
committed
tools: Remove QueryApiCatalogCommand
This is only used in build.sh now, and we can replace that by using the find command.
1 parent af3bf06 commit 2be5591

File tree

3 files changed

+1
-84
lines changed

3 files changed

+1
-84
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ then
6464
# Build ReleaseManager first separately, so that we get any build messages
6565
# here rather than when we try to run it
6666
dotnet build tools/Google.Cloud.Tools.ReleaseManager
67-
apis=(${tools} $(dotnet run --no-build --no-restore --project tools/Google.Cloud.Tools.ReleaseManager -- query-api-catalog list))
67+
apis=(${tools} $(find apis -depth -mindepth 1 -maxdepth 1 -type d | sed 's#^apis/##'))
6868
fi
6969

7070
# If we were given an API filter regex, apply it now.

tools/Google.Cloud.Tools.ReleaseManager/Program.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ private static int Main(string[] args)
5252

5353
private static ICommand GetCommand(string[] args)
5454
{
55-
// This is called a lot during local generation, and doesn't do much. The reflection required
56-
// to instantiate all the commands is significant, so we bypass it when we can.
57-
if (args.Length >= 1 && args[0] == QueryApiCatalogCommand.CommandName)
58-
{
59-
return new QueryApiCatalogCommand();
60-
}
61-
6255
var allCommands = typeof(Program).Assembly.GetTypes()
6356
.Where(t => !t.IsAbstract && typeof(ICommand).IsAssignableFrom(t))
6457
.Select(Activator.CreateInstance)

tools/Google.Cloud.Tools.ReleaseManager/QueryApiCatalogCommand.cs

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)