1
0
mirror of https://github.com/go-task/task.git synced 2025-11-29 22:48:03 +02:00

Add new TASK_VERSION special variable

Closes #1014
Closes #990
This commit is contained in:
João Pedro
2023-02-19 22:28:17 -03:00
committed by Andrey Nering
parent 12a1cd6f62
commit ec2110e58f
10 changed files with 45 additions and 28 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/go-task/task/v3/internal/filepathext"
"github.com/go-task/task/v3/internal/logger"
"github.com/go-task/task/v3/internal/templater"
"github.com/go-task/task/v3/internal/version"
"github.com/go-task/task/v3/taskfile"
)
@@ -184,6 +185,7 @@ func (c *CompilerV3) getSpecialVars(t *taskfile.Task) (map[string]string, error)
"ROOT_DIR": c.Dir,
"TASKFILE_DIR": taskfileDir,
"USER_WORKING_DIR": c.UserWorkingDir,
"TASK_VERSION": version.GetVersion(),
}, nil
}