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

feat: add a deprecation warning when running Taskfiles with a v2 schema (#1199)

This commit is contained in:
Pete Davison
2023-06-04 01:05:48 +01:00
committed by GitHub
parent 75659485ee
commit 7a2f8d691c
3 changed files with 21 additions and 3 deletions

View File

@@ -250,7 +250,11 @@ func (e *Executor) doVersionChecks() error {
*v = *e.Taskfile.Version
if v.LessThan(taskfile.V2) {
return fmt.Errorf(`task: Taskfile versions prior to v2 are not supported anymore`)
return fmt.Errorf(`task: version 1 schemas are no longer supported`)
}
if v.LessThan(taskfile.V3) {
e.Logger.Errf(logger.Yellow, "task: version 2 schemas are deprecated and will be removed in a future release\nSee https://github.com/go-task/task/issues/1197 for more details\n")
}
// consider as equal to the greater version if round