mirror of
https://github.com/go-task/task.git
synced 2025-03-23 21:29:29 +02:00
1.8 KiB
1.8 KiB
slug | sidebar_position | title |
---|---|---|
/ | 1 | 主页 |
Task
Task 是一个任务运行器/构建工具,旨在比 GNU Make 等更简单易用。
由于它是用 Go 编写的,Task 只是一个二进制文件,没有其他依赖项,这意味着您不需要为了使用构建工具而烦恼任何复杂的安装设置。
Once installed, you just need to describe your build tasks using a simple YAML schema in a file called Taskfile.yml
:
version: '3'
tasks:
hello:
cmds:
- echo 'Hello World from Task!'
silent: true
然后通过从您的终端运行 task hello
来调用它。
上面的示例只是一个开始,您可以查看 使用指南 以检查完整的规则文档和 Task 功能。
Features
- Easy installation: just download a single binary, add to
$PATH
and you're done! 或者,您也可以根据需要使用 Homebrew、Snapcraft 或 Scoop 进行安装。 - Available on CIs: by adding this simple command to install on your CI script and you're ready to use Task as part of your CI pipeline;
- 真正的跨平台:虽然大多数构建工具只能在 Linux 或 macOS 上运行良好,但由于 这个用于 Go 的 shell 解释器,Task 也支持 Windows。
- 非常适合代码生成:如果给定的一组文件自上次运行以来没有更改(基于其时间戳或内容),您可以轻松地 阻止 task 运行。