diff --git a/.goreleaser.yml b/.goreleaser.yml index 306cb603..f0697008 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -40,4 +40,4 @@ nfpms: formats: - deb - rpm - name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}" + file_name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cabbfcd..c93da12b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +# v3.0.0 - Unreleased + +- Add `label:` to task so you can override the task name in the logs + ([#321](https://github.com/go-task/task/issues/321]), [#337](https://github.com/go-task/task/pull/337)). + +# v3.0.0 - Preview 4 + +- Refactor how variables work on version 3 + ([#311](https://github.com/go-task/task/pull/311)). +- Disallow `expansions` on v3 since it has no effect. +- `Taskvars.yml` is not automatically included anymore. +- `Taskfile_{{OS}}.yml` is not automatically included anymore. +- Allow interpolation on `includes`, so you can manually include a Taskfile + based on operation system, for example. + # v3.0.0 - Preview 3 - Expose `.TASK` variable in templates with the task name @@ -36,6 +51,17 @@ commands are green, errors are red, etc ([#207](https://github.com/go-task/task/pull/207)). +## v2.8.1 - 2019-05-20 + +- Fix error code for the `--help` flag + ([#300](https://github.com/go-task/task/issues/300), [#330](https://github.com/go-task/task/pull/330)). +- Print version to stdout instead of stderr + ([#299](https://github.com/go-task/task/issues/299), [#329](https://github.com/go-task/task/pull/329)). +- Supress `context` errors when using the `--watch` flag + ([#313](https://github.com/go-task/task/issues/313), [#317](https://github.com/go-task/task/pull/317)). +- Support templating on description + ([#276](https://github.com/go-task/task/issues/276), [#283](https://github.com/go-task/task/pull/283)). + ## v2.8.0 - 2019-12-07 - Add `--parallel` flag (alias `-p`) to run tasks given by the command line in diff --git a/README.md b/README.md index b5b3fd45..ff6f70f9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[](https://travis-ci.org/go-task/task) + + # Task diff --git a/cmd/task/task.go b/cmd/task/task.go index d99db44d..889fa0ad 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -2,6 +2,7 @@ package main import ( "context" + "fmt" "log" "os" "os/signal" @@ -52,6 +53,7 @@ func main() { var ( versionFlag bool + helpFlag bool init bool list bool status bool @@ -69,6 +71,7 @@ func main() { ) pflag.BoolVar(&versionFlag, "version", false, "show Task version") + pflag.BoolVarP(&helpFlag, "help", "h", false, "shows Task usage") pflag.BoolVarP(&init, "init", "i", false, "creates a new Taskfile.yml in the current folder") pflag.BoolVarP(&list, "list", "l", false, "lists tasks with description of current Taskfile") pflag.BoolVar(&status, "status", false, "exits with non-zero exit code if any of the given tasks is not up-to-date") @@ -86,7 +89,12 @@ func main() { pflag.Parse() if versionFlag { - log.Printf("Task version: %s\n", version) + fmt.Printf("Task version: %s\n", version) + return + } + + if helpFlag { + pflag.Usage() return } @@ -140,9 +148,7 @@ func main() { } calls, globals := args.Parse(pflag.Args()...) - for name, value := range globals { - e.Taskfile.Vars[name] = value - } + e.Taskfile.Vars.Merge(globals) ctx := context.Background() if !watch { diff --git a/completion/zsh/_task b/completion/zsh/_task index f2bd81de..48777e4b 100755 --- a/completion/zsh/_task +++ b/completion/zsh/_task @@ -5,7 +5,7 @@ function __list() { local -a scripts if [ -f Taskfile.yml ]; then - scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/')) + scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/g')) _describe 'script' scripts fi } diff --git a/docs/_sidebar.md b/docs/_sidebar.md index f71c5ed0..c9f3d4d5 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -5,4 +5,4 @@ - [Examples](examples.md) - [Releasing Task](releasing_task.md) - [Alternative Task Runners](alternative_task_runners.md) -- [Github](https://github.com/go-task/task) +- [GitHub](https://github.com/go-task/task) diff --git a/docs/index.html b/docs/index.html index 4a832385..73eff81a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,25 +6,8 @@ - + -
@@ -32,7 +15,6 @@ window.$docsify = { name: 'Task', repo: 'go-task/task', - ga: 'UA-126286662-1', themeColor: '#00add8', loadSidebar: true, auto2top: true, @@ -40,10 +22,10 @@ subMaxLevel: 3 } - - - - - + + + + +