From bae2641808a0d506f6213d54c9c47343b632b496 Mon Sep 17 00:00:00 2001 From: maddalax Date: Fri, 13 Sep 2024 15:02:11 -0500 Subject: [PATCH] this is insane --- framework/tooling/{taskrunner => mhtml}/Taskfile.yml | 0 framework/tooling/{taskrunner => mhtml}/runner.go | 7 +++++-- setup.md | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) rename framework/tooling/{taskrunner => mhtml}/Taskfile.yml (100%) rename framework/tooling/{taskrunner => mhtml}/runner.go (87%) create mode 100644 setup.md diff --git a/framework/tooling/taskrunner/Taskfile.yml b/framework/tooling/mhtml/Taskfile.yml similarity index 100% rename from framework/tooling/taskrunner/Taskfile.yml rename to framework/tooling/mhtml/Taskfile.yml diff --git a/framework/tooling/taskrunner/runner.go b/framework/tooling/mhtml/runner.go similarity index 87% rename from framework/tooling/taskrunner/runner.go rename to framework/tooling/mhtml/runner.go index f3eb1ad..c009446 100644 --- a/framework/tooling/taskrunner/runner.go +++ b/framework/tooling/mhtml/runner.go @@ -12,7 +12,7 @@ import ( var taskFile string func main() { - taskFlag := flag.String("task", "", "Specify the task to run (e.g., build, clean, deploy)") + taskFlag := flag.String("task", "", "Specify the task to run (e.g., build, setup). Type -task list to see the list of tasks to run.") // Parse the command-line flags flag.Parse() @@ -31,6 +31,10 @@ func main() { return } + if *taskFlag == "list" { + *taskFlag = "--list" + } + // Define the command and arguments cmd := exec.Command("task", "-t", temp.Name(), *taskFlag) // Set the standard output and error to be the same as the Go program @@ -42,5 +46,4 @@ func main() { fmt.Printf("Error running task command: %v\n", err) return } - fmt.Println("Task executed successfully!") } diff --git a/setup.md b/setup.md new file mode 100644 index 0000000..fc9557f --- /dev/null +++ b/setup.md @@ -0,0 +1,2 @@ +go install github.com/maddalax/mhtml/framework/tooling/mhtml +