mirror of
https://github.com/go-task/task.git
synced 2025-06-25 00:47:04 +02:00
CHANGELOG: Add entry for #691
This commit is contained in:
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- The `--list` and `--list-all` flags can now be combined with the `--silent`
|
||||||
|
flag to print the task names only, without their description
|
||||||
|
([#691](https://github.com/go-task/task/pull/691)).
|
||||||
- Added support for multi-level inclusion of Taskfiles. This means that
|
- Added support for multi-level inclusion of Taskfiles. This means that
|
||||||
included Taskfiles can also include other Taskfiles. Before this was limited
|
included Taskfiles can also include other Taskfiles. Before this was limited
|
||||||
to one level
|
to one level
|
||||||
|
6
help.go
6
help.go
@ -3,6 +3,7 @@ package task
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
@ -79,9 +80,12 @@ func (e *Executor) tasksWithDesc() (tasks []*taskfile.Task) {
|
|||||||
// Otherwise, all task names are printed.
|
// Otherwise, all task names are printed.
|
||||||
func (e *Executor) ListTaskNames(allTasks bool) {
|
func (e *Executor) ListTaskNames(allTasks bool) {
|
||||||
// if called from cmd/task.go, e.Taskfile has not yet been parsed
|
// if called from cmd/task.go, e.Taskfile has not yet been parsed
|
||||||
if nil == e.Taskfile && e.readTaskfile() != nil {
|
if e.Taskfile == nil {
|
||||||
|
if err := e.readTaskfile(); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// use stdout if no output defined
|
// use stdout if no output defined
|
||||||
var w io.Writer = os.Stdout
|
var w io.Writer = os.Stdout
|
||||||
if e.Stdout != nil {
|
if e.Stdout != nil {
|
||||||
|
5
task.go
5
task.go
@ -106,11 +106,6 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
|||||||
|
|
||||||
// readTaskfile selects and parses the entrypoint.
|
// readTaskfile selects and parses the entrypoint.
|
||||||
func (e *Executor) readTaskfile() error {
|
func (e *Executor) readTaskfile() error {
|
||||||
// select the default entrypoint if not provided
|
|
||||||
if e.Entrypoint == "" {
|
|
||||||
e.Entrypoint = "Taskfile.yml"
|
|
||||||
}
|
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
e.Taskfile, err = read.Taskfile(&read.ReaderNode{
|
e.Taskfile, err = read.Taskfile(&read.ReaderNode{
|
||||||
Dir: e.Dir,
|
Dir: e.Dir,
|
||||||
|
Reference in New Issue
Block a user