2018-09-22 23:44:24 +02:00
|
|
|
# Installation
|
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
Task offers many installation methods. Check out the available methods below.
|
2018-09-22 23:44:24 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
## Package Managers
|
2018-09-22 23:44:24 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
<!-- tabs:start -->
|
|
|
|
|
|
|
|
#### **Homebrew**
|
2018-09-22 23:44:24 +02:00
|
|
|
|
2019-07-21 16:03:20 +02:00
|
|
|
If you're on macOS or Linux and have [Homebrew][homebrew] installed, getting
|
|
|
|
Task is as simple as running:
|
2018-09-22 23:44:24 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
brew install go-task/tap/go-task
|
|
|
|
```
|
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **Snap**
|
2018-09-22 23:44:24 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
Task is available in [Snapcraft][snapcraft], but keep in mind that your
|
2018-09-22 23:44:24 +02:00
|
|
|
Linux distribution should allow classic confinement for Snaps to Task work
|
|
|
|
right:
|
|
|
|
|
|
|
|
```bash
|
2020-05-23 18:43:57 +02:00
|
|
|
sudo snap install task --classic
|
2018-09-22 23:44:24 +02:00
|
|
|
```
|
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **Scoop**
|
2018-12-06 15:21:03 +02:00
|
|
|
|
|
|
|
If you're on Windows and have [Scoop][scoop] installed, use `extras` bucket
|
|
|
|
to install Task like:
|
|
|
|
|
|
|
|
```cmd
|
|
|
|
scoop bucket add extras
|
|
|
|
scoop install task
|
|
|
|
```
|
|
|
|
|
2018-12-24 18:39:53 +02:00
|
|
|
This installation method is community owned. After a new release of Task, it
|
|
|
|
may take some time until it's available on Scoop.
|
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **AUR**
|
2020-01-25 14:44:55 +02:00
|
|
|
|
|
|
|
If you're on Arch Linux you can install Task from
|
|
|
|
[AUR](https://aur.archlinux.org/packages/taskfile-git) using your favorite
|
|
|
|
package manager such as `yay`, `pacaur` or `yaourt`:
|
|
|
|
|
|
|
|
```cmd
|
|
|
|
yay -S taskfile-git
|
|
|
|
```
|
|
|
|
|
|
|
|
This installation method is community owned, but since it's `-git` version of
|
2020-02-10 10:45:27 +02:00
|
|
|
the package, it's always latest available version based on the Git repository.
|
2020-01-25 14:44:55 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
<!-- tabs:end -->
|
2018-10-07 23:34:03 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
## Get The Binary
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
<!-- tabs:start -->
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **Binary**
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
You can download the binary from the [releases page on GitHub][releases] and
|
|
|
|
add to your `$PATH`.
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
DEB and RPM packages are also available.
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
The `task_checksums.txt` file contains the SHA-256 checksum for each file.
|
2018-11-11 00:10:44 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **Install Script**
|
2018-09-22 23:44:24 +02:00
|
|
|
|
|
|
|
We also have a [install script][installscript], which is very useful on
|
2020-05-23 18:43:57 +02:00
|
|
|
scenarios like CIs. Many thanks to [GoDownloader][godownloader] for allowing
|
2018-10-07 23:34:03 +02:00
|
|
|
easily generating this script.
|
2018-09-22 23:44:24 +02:00
|
|
|
|
|
|
|
```bash
|
2020-10-07 21:57:25 +02:00
|
|
|
# For Default Installion to ./bin with debug logging
|
2020-11-17 10:02:06 +02:00
|
|
|
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
|
2020-10-17 01:12:26 +02:00
|
|
|
|
|
|
|
# For Installation To /usr/local/bin for userwide access with debug logging
|
|
|
|
# May require sudo sh
|
2020-11-17 10:02:06 +02:00
|
|
|
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
|
2020-10-07 21:57:25 +02:00
|
|
|
|
2018-09-22 23:44:24 +02:00
|
|
|
```
|
|
|
|
|
2018-10-07 23:34:03 +02:00
|
|
|
> This method will download the binary on the local `./bin` directory by default.
|
2018-09-22 23:44:24 +02:00
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
#### **GitHub Actions**
|
2019-10-25 04:55:11 +02:00
|
|
|
|
|
|
|
If you want to install Task in GitHub Actions you can try using
|
|
|
|
[this action](https://github.com/arduino/actions/tree/master/setup-taskfile)
|
|
|
|
by the Arduino team:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
- name: Install Task
|
|
|
|
uses: Arduino/actions/setup-taskfile@master
|
|
|
|
```
|
|
|
|
|
|
|
|
This installation method is community owned.
|
|
|
|
|
2020-05-23 18:43:57 +02:00
|
|
|
<!-- tabs:end -->
|
|
|
|
|
|
|
|
## Build From Source
|
|
|
|
|
|
|
|
<!-- tabs:start -->
|
|
|
|
|
|
|
|
#### **Go Modules**
|
|
|
|
|
|
|
|
First, make sure you have [Go][go] properly installed and setup.
|
|
|
|
|
2020-12-26 20:06:39 +02:00
|
|
|
You can easily install it globally by running:
|
2020-05-23 18:43:57 +02:00
|
|
|
|
2020-12-26 20:06:39 +02:00
|
|
|
```bash
|
|
|
|
go get -u github.com/go-task/task/v3/cmd/task
|
|
|
|
```
|
|
|
|
|
|
|
|
Or you can install into another directory:
|
2020-05-23 18:43:57 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://github.com/go-task/task
|
|
|
|
cd task
|
|
|
|
|
|
|
|
# Compiling binary to $GOPATH/bin
|
|
|
|
go install -v ./cmd/task
|
|
|
|
|
|
|
|
# Compiling it to another location.
|
|
|
|
# Use -o ./task.exe on Windows.
|
|
|
|
go build -v -o ./task ./cmd/task
|
|
|
|
```
|
|
|
|
|
|
|
|
> For CI environments we recommend using the [Install Script](#get-the-binary)
|
|
|
|
> instead, which is faster and more stable, since it'll just download the latest
|
|
|
|
> released binary, instead of compiling the edge (master branch) version.
|
|
|
|
|
|
|
|
<!-- tabs:end -->
|
|
|
|
|
2018-10-07 23:34:03 +02:00
|
|
|
[go]: https://golang.org/
|
2020-05-23 18:43:57 +02:00
|
|
|
[snapcraft]: https://snapcraft.io/task
|
2018-09-22 23:44:24 +02:00
|
|
|
[homebrew]: https://brew.sh/
|
|
|
|
[installscript]: https://github.com/go-task/task/blob/master/install-task.sh
|
|
|
|
[releases]: https://github.com/go-task/task/releases
|
|
|
|
[godownloader]: https://github.com/goreleaser/godownloader
|
2018-12-06 15:21:03 +02:00
|
|
|
[scoop]: https://scoop.sh/
|