mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
added yml/json/toml support, --help flag, and example directory
Signed-off-by: Andrey Nering <andrey.nering@gmail.com>
This commit is contained in:
@@ -1,9 +1,34 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-task/task"
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.CommandLine.Usage = func() {
|
||||
fmt.Println(`
|
||||
task [target1 target2 ...]: Runs commands under targets like make.
|
||||
|
||||
Example: 'task hello' with the following 'Taskfile.json' file will generate
|
||||
an 'output.txt' file.
|
||||
'''
|
||||
{
|
||||
"hello": {
|
||||
"cmds": [
|
||||
"echo \"I am going to write a file named 'output.txt' now.\"",
|
||||
"echo \"hello\" > output.txt"
|
||||
],
|
||||
"generates": [
|
||||
"output.txt"
|
||||
]
|
||||
}
|
||||
}
|
||||
'''
|
||||
`)
|
||||
}
|
||||
flag.Parse()
|
||||
task.Run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user