1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

feat: add ability to set watch: true in Taskfile (#1361)

This commit is contained in:
Andrey Nering
2023-10-07 18:06:43 -03:00
committed by GitHub
parent 383746fcee
commit adfb96b637
6 changed files with 65 additions and 4 deletions

View File

@@ -41,6 +41,7 @@ type Task struct {
IncludedTaskfile *IncludedTaskfile
Platforms []*Platform
Location *Location
Watch bool
}
func (t *Task) Name() string {
@@ -101,6 +102,7 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
Run string
Platforms []*Platform
Requires *Requires
Watch bool
}
if err := node.Decode(&task); err != nil {
return err
@@ -138,6 +140,7 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
t.Run = task.Run
t.Platforms = task.Platforms
t.Requires = task.Requires
t.Watch = task.Watch
return nil
}