feat: Working on moving commands to cli-client

This commit is contained in:
2024-12-12 07:46:26 -05:00
parent 8302ede99e
commit ce6eb3ec2f
13 changed files with 134 additions and 199 deletions

View File

@@ -26,12 +26,30 @@ struct BuildCommand: AsyncParsableCommand {
var extraArgs: [String] = []
mutating func run() async throws {
try await runPlaybook(
commandName: Self.commandName,
globals: globals,
extraArgs: extraArgs,
"--tags", "build-project",
"--extra-vars", "project_dir=\(projectDir)"
)
try await _run()
// try await runPlaybook(
// commandName: Self.commandName,
// globals: globals,
// extraArgs: extraArgs,
// "--tags", "build-project",
// "--extra-vars", "project_dir=\(projectDir)"
// )
}
private func _run() async throws {
try await withSetupLogger(commandName: Self.commandName, globals: globals) {
@Dependency(\.cliClient) var cliClient
try await cliClient.runPlaybookCommand(
globals.playbookOptions(
arguments: [
"--tags", "build-project",
"--extra-vars", "project_dir=\(self.projectDir)"
],
configuration: nil
)
)
}
}
}