1
0
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:
Andrey Nering
2018-04-15 11:11:07 -03:00
parent 2cb2668803
commit 8b3c34c308
3 changed files with 26 additions and 25 deletions

View File

@@ -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 {