mirror of
https://github.com/go-task/task.git
synced 2025-11-29 22:48:03 +02:00
Add "output" options to the Taskfile
Also, fix handling of Taskfile by making the version an instance of `semver.Constraints` instead of `semver.Version`. This makes the version works as described on TASKFILE_VERSIONS.md document, i.e. version "2" will include "2.x" features but version "2.0" not.
This commit is contained in:
@@ -4,6 +4,7 @@ package taskfile
|
||||
type Taskfile struct {
|
||||
Version string
|
||||
Expansions int
|
||||
Output string
|
||||
Vars Vars
|
||||
Tasks Tasks
|
||||
}
|
||||
@@ -18,6 +19,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var taskfile struct {
|
||||
Version string
|
||||
Expansions int
|
||||
Output string
|
||||
Vars Vars
|
||||
Tasks Tasks
|
||||
}
|
||||
@@ -26,6 +28,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
}
|
||||
tf.Version = taskfile.Version
|
||||
tf.Expansions = taskfile.Expansions
|
||||
tf.Output = taskfile.Output
|
||||
tf.Vars = taskfile.Vars
|
||||
tf.Tasks = taskfile.Tasks
|
||||
if tf.Expansions <= 0 {
|
||||
|
||||
Reference in New Issue
Block a user