From 13cf3d9dcd0f15ea1bf545ddacca1a1876f3b339 Mon Sep 17 00:00:00 2001 From: "Random._." Date: Sat, 26 Jul 2025 07:08:30 +0000 Subject: [PATCH 1/2] feat: option to add taskfile via install-release --- website/docs/installation.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/installation.mdx b/website/docs/installation.mdx index 59c96ed6fd..d8eba51d88 100644 --- a/website/docs/installation.mdx +++ b/website/docs/installation.mdx @@ -150,6 +150,17 @@ or, if you have pkgx integration enabled: task ``` +### [install-release][install-release] ![][macos] ![linux] ![community] \{#install-release} + +`install-release` is package manager to install any single binary tools from their github release + +[[source](https://github.com/Rishang/install-release)] + +```shell +ir get https://github.com/go-task/task +``` + + ## Get The Binary ### Binary From b2f63eddf8c0eb7e46fa564d1cbc70c31105d767 Mon Sep 17 00:00:00 2001 From: "Random._." Date: Fri, 5 Sep 2025 10:37:46 +0000 Subject: [PATCH 2/2] fix: conflicts --- website/docs/installation.mdx | 365 ------------------------------- website/src/docs/installation.md | 10 + 2 files changed, 10 insertions(+), 365 deletions(-) delete mode 100644 website/docs/installation.mdx diff --git a/website/docs/installation.mdx b/website/docs/installation.mdx deleted file mode 100644 index d8eba51d88..0000000000 --- a/website/docs/installation.mdx +++ /dev/null @@ -1,365 +0,0 @@ ---- -slug: /installation/ -sidebar_position: 2 -toc_max_heading_level: 4 ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Installation - -Task offers many installation methods. Check out the available methods below. - -:::info - -Some of the methods below are marked as ![Community][community]. This means they -are not maintained by the Task team and may not be up-to-date. - -::: - -## Package Managers - -### [Homebrew][homebrew] ![][macos] ![][linux] \{#homebrew} - -Task is available via our official Homebrew tap [[source](https://github.com/go-task/homebrew-tap/blob/main/Formula/go-task.rb)]: - -```shell -brew install go-task/tap/go-task -``` - -Alternatively it can be installed from the official Homebrew -repository [[package](https://formulae.brew.sh/formula/go-task)] -[[source](https://github.com/Homebrew/homebrew-core/blob/master/Formula/g/go-task.rb)] by running: - -```shell -brew install go-task -``` - -### [Macports][macports] ![][macos] ![][community] \{#macports} - -Task repository is tracked by Macports [[package](https://ports.macports.org/port/go-task/details/)] [[source](https://github.com/macports/macports-ports/blob/master/devel/go-task/Portfile)]: - -```shell -port install go-task -``` - -### [Snap][snapcraft] ![][macos] ![][linux] \{#snap} - -Task is available on [Snapcraft][snapcraft] [[source](https://github.com/go-task/snap/blob/main/snap/snapcraft.yaml)], but keep in mind that your Linux -distribution should allow classic confinement for Snaps to Task work correctly: - -```shell -sudo snap install task --classic -``` - -### [npm][npm] ![][macos] ![][linux] ![][windows] \{#npm} - -Npm can be used as cross-platform way to install Task globally or as a -dependency of your project -[[package](https://www.npmjs.com/package/@go-task/cli)] [[source](https://github.com/go-task/task/blob/main/package.json)]: - -```shell -npm install -g @go-task/cli -``` - -### [pip][pip] ![][macos] ![][linux] ![][windows] ![][community] \{#pip} - -Like npm, pip can be used as a cross-platform way to install Task -[[package](https://pypi.org/project/go-task-bin)] [[source](https://github.com/Bing-su/pip-binary-factory/tree/main/task)]: - -```shell -pip install go-task-bin -``` - -### [WinGet][winget] ![][windows] \{#winget} - -Task is available via the [community repository](https://github.com/microsoft/winget-pkgs) [[source](https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/Task/Task)]: - -```shell -winget install Task.Task -``` - -### [Chocolatey][choco] ![][windows] ![][community] \{#chocolatey} - -[[package](https://community.chocolatey.org/packages/go-task)] [[source](https://github.com/Starz0r/ChocolateyPackagingScripts/blob/master/src/go-task_gh_build.py)] - -```shell -choco install go-task -``` - -### [Scoop][scoop] ![][windows] ![][community] \{#scoop} - -[[source](https://github.com/ScoopInstaller/Main/blob/master/bucket/task.json)] - -```shell -scoop install task -``` - -### Arch ([pacman][pacman]) ![][arch] ![][community] \{#arch} - -[[package](https://archlinux.org/packages/extra/x86_64/go-task/)] [[source](https://gitlab.archlinux.org/archlinux/packaging/packages/go-task)] - -```shell -pacman -S go-task -``` - -### Fedora ([dnf][dnf]) ![][fedora] ![][community] \{#fedora} - -[[package](https://packages.fedoraproject.org/pkgs/golang-github-task/go-task/)] [[source](https://src.fedoraproject.org/rpms/golang-github-task)] - -```shell -dnf install go-task -``` - -### FreeBSD ([Ports][freebsdports]) ![][freebsd] ![][community] \{#freebsd} - -[[package](https://cgit.freebsd.org/ports/tree/devel/task)] [[source](https://cgit.freebsd.org/ports/tree/devel/task/Makefile)] - -```shell -pkg install task -``` - -### NixOS ([nix][nix]) ![][nixos] ![][linux] ![][community] \{#nix} - -[[source](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/go/go-task/package.nix)] - -```shell -nix-env -iA nixpkgs.go-task -``` - -### [pacstall][pacstall] ![][debian] ![][ubuntu] ![][community] \{#pacstall} - -[[package](https://pacstall.dev/packages/go-task-deb)] [[source](https://github.com/pacstall/pacstall-programs/blob/master/packages/go-task-deb/go-task-deb.pacscript)] - -```shell -pacstall -I go-task-deb -``` - -### [pkgx][pkgx] ![][macos] ![][linux] ![][community] \{#pkgx} - -[[package](https://pkgx.dev/pkgs/taskfile.dev)] [[source](https://github.com/pkgxdev/pantry/blob/main/projects/taskfile.dev/package.yml)] - -```shell -pkgx task -``` - -or, if you have pkgx integration enabled: - -```shell -task -``` - -### [install-release][install-release] ![][macos] ![linux] ![community] \{#install-release} - -`install-release` is package manager to install any single binary tools from their github release - -[[source](https://github.com/Rishang/install-release)] - -```shell -ir get https://github.com/go-task/task -``` - - -## Get The Binary - -### Binary - -You can download the binary from the [releases page on GitHub][releases] and add -to your `$PATH`. - -DEB and RPM packages are also available. - -The `task_checksums.txt` file contains the SHA-256 checksum for each file. - -### Install Script - -We also have an [install script][installscript] which is very useful in -scenarios like CI. Many thanks to [GoDownloader][godownloader] for enabling the -easy generation of this script. - -By default, it installs on the `./bin` directory relative to the working -directory: - -```shell -sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -``` - -It is possible to override the installation directory with the `-b` parameter. -On Linux, common choices are `~/.local/bin` and `~/bin` to install for the -current user or `/usr/local/bin` to install for all users: - -```shell -sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin -``` - -:::caution - -On macOS and Windows, `~/.local/bin` and `~/bin` are not added to `$PATH` by -default. - -::: - -By default, it installs the latest version available. -You can also specify a tag (available in [releases](https://github.com/go-task/task/releases)) -to install a specific version: - -```shell -sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d v3.36.0 -``` - -Parameters are order specific, to set both installation directory and version: -```shell -sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin v3.42.1 -``` - -### GitHub Actions - -If you want to install Task in GitHub Actions you can try using -[this action](https://github.com/arduino/setup-task) by the Arduino team: - -```yaml -- name: Install Task - uses: arduino/setup-task@v2 - with: - version: 3.x - repo-token: ${{ secrets.GITHUB_TOKEN }} -``` - -This installation method is community owned. - -## Build From Source - -### Go Modules - -Ensure that you have a supported version of [Go][go] 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. - -You can then install the latest release globally by running: - -```shell -go install github.com/go-task/task/v3/cmd/task@latest -``` - -Or you can install into another directory: - -```shell -env GOBIN=/bin go install github.com/go-task/task/v3/cmd/task@latest -``` - -:::tip - -For CI environments we recommend using the [install script](#install-script) -instead, which is faster and more stable, since it'll just download the latest -released binary. - -::: - -## Setup completions - -Some installation methods will automatically install completions too, but if -this isn't working for you or your chosen method doesn't include them, you can -run `task --completion ` to output a completion script for any supported -shell. There are a couple of ways these completions can be added to your shell -config: - -### Option 1. Load the completions in your shell's startup config (Recommended) - -This method loads the completion script from the currently installed version of -task every time you create a new shell. This ensures that your completions are -always up-to-date. - - - - -```shell title="~/.bashrc" -eval "$(task --completion bash)" -``` - - - -```shell title="~/.zshrc" -eval "$(task --completion zsh)" -``` - - - -```shell title="~/.config/fish/config.fish" -task --completion fish | source -``` - - - -```powershell title="$PROFILE\Microsoft.PowerShell_profile.ps1" -Invoke-Expression (&task --completion powershell | Out-String) -``` - - -### Option 2. Copy the script to your shell's completions directory - -This method requires you to manually update the completions whenever Task is -updated. However, it is useful if you want to modify the completions yourself. - - - - -```shell -task --completion bash > /etc/bash_completion.d/task -``` - - - -```shell -task --completion zsh > /usr/local/share/zsh/site-functions/_task -``` - - - -```shell -task --completion fish > ~/.config/fish/completions/task.fish -``` - - -{/* prettier-ignore-start */} -[homebrew]: https://brew.sh -[macports]: https://macports.org -[snapcraft]: https://snapcraft.io/task -[winget]: https://github.com/microsoft/winget-cli -[choco]: https://chocolatey.org -[scoop]: https://scoop.sh -[pacman]: https://wiki.archlinux.org/title/Pacman -[dnf]: https://docs.fedoraproject.org/en-US/quick-docs/dnf -[nix]: https://nixos.org -[npm]: https://www.npmjs.com -[pip]: https://pip.pypa.io -[mise]: https://mise.jdx.dev -[aqua]: https://aquaproj.github.io -[pacstall]: https://github.com/pacstall/pacstall -[pkgx]: https://pkgx.sh -[freebsdports]: https://ports.freebsd.org/cgi/ports.cgi - -[go]: https://golang.org -[godownloader]: https://github.com/goreleaser/godownloader -[releases]: https://github.com/go-task/task/releases -[installscript]: https://github.com/go-task/task/blob/main/install-task.sh - -[community]: https://img.shields.io/badge/Community%20Owned-orange -[windows]: https://custom-icon-badges.demolab.com/badge/Windows-0078D6?logo=windows11&logoColor=white -[macos]: https://img.shields.io/badge/MacOS-000000?logo=apple&logoColor=F0F0F0 -[linux]: https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black -[arch]: https://img.shields.io/badge/Arch%20Linux-1793D1?logo=arch-linux&logoColor=fff -[fedora]: https://img.shields.io/badge/Fedora-51A2DA?logo=fedora&logoColor=fff -[nixos]: https://img.shields.io/badge/NixOS-5277C3?logo=nixos&logoColor=fff -[debian]: https://img.shields.io/badge/Debian-A81D33?logo=debian&logoColor=fff -[ubuntu]: https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu&logoColor=fff -[freebsd]: https://img.shields.io/badge/FreeBSD-990000?logo=freebsd&logoColor=fff -{/* prettier-ignore-end */} diff --git a/website/src/docs/installation.md b/website/src/docs/installation.md index 5caf7e0990..9a551cc8af 100644 --- a/website/src/docs/installation.md +++ b/website/src/docs/installation.md @@ -195,6 +195,16 @@ or, if you have pkgx integration enabled: task ``` +### [install-release][install-release] ![][macos] ![linux] ![community] \{#install-release} + +`install-release` is package manager to install any single binary tools from their github release + +[[source](https://github.com/Rishang/install-release)] + +```shell +ir get https://github.com/go-task/task +``` + ## Get The Binary ### Binary