Skip to content

Commit

Permalink
feat: Allow a container-clean api-path of "none"
Browse files Browse the repository at this point in the history
When provided "none", the container should clean just
non-API-specific files.
  • Loading branch information
jskeet committed Dec 16, 2024
1 parent 97aa134 commit b724164
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace Google.Cloud.Tools.ReleaseManager.ContainerCommands;
/// - repo-root: path to the root of the clone
/// - api-path: path to the API to clean generated files from, e.g. google/cloud/functions/v2
/// This is optional; when omitted, all configured APIs are cleaned.
/// The special value of "none" means "clean non-API-specific files only".
/// </summary>
internal class CleanCommand : IContainerCommand
{
Expand All @@ -49,6 +50,11 @@ public int Execute(Dictionary<string, string> options)
apis.Add(targetApi);
}
}
// No APIs, just clean non-API-specific.
else if (apiPath == "none")
{
apis = new();
}
else
{
apis = catalog.Apis.ToList();
Expand Down

0 comments on commit b724164

Please sign in to comment.