mirror of
https://github.com/go-task/task.git
synced 2026-06-28 15:14:18 +00:00
docs: document and add blog post about go tool task (#2791)
This commit is contained in:
@@ -320,8 +320,6 @@ examples and configuration.
|
||||
|
||||
## Build From Source
|
||||
|
||||
### Go Modules
|
||||
|
||||
Ensure that you have a supported version of [Go](https://golang.org) properly
|
||||
installed and setup. You can find the minimum required version of Go in the
|
||||
[go.mod](https://github.com/go-task/task/blob/main/go.mod#L3) file.
|
||||
@@ -346,6 +344,26 @@ released binary.
|
||||
|
||||
:::
|
||||
|
||||
## Go Tool
|
||||
|
||||
If you're working in a Go project, a nice possibility is using `go tool`.
|
||||
`go tool` makes it easy to run Task without needing to install the binary
|
||||
manually. This works well on CI.
|
||||
|
||||
To do that, just run the following to add Task as a tool in your Go project.
|
||||
Task will be added to your `go.mod`.
|
||||
|
||||
```bash
|
||||
go get -tool github.com/go-task/task/v3/cmd/task@latest
|
||||
```
|
||||
|
||||
Then, prefix `go tool` when calling Task like below. Go will compile Task on
|
||||
demand before calling it.
|
||||
|
||||
```bash
|
||||
go tool task {arguments...}
|
||||
```
|
||||
|
||||
## Setup completions
|
||||
|
||||
Some installation methods will automatically install completions too, but if
|
||||
|
||||
Reference in New Issue
Block a user