1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00
Commit Graph

46 Commits

Author SHA1 Message Date
a3fce1c302 feat: variable references (#1654)
* feat: add references to the base code instead of the maps experiment

* feat: add template functions to ref resolver

* feat: tests

* docs: variable references

* feat: remove json and yaml keys from map variable experiment

* chore: typo
2024-05-16 16:20:59 +01:00
252d549e3f feat: task executable variable (#1624) 2024-05-15 21:50:18 -03:00
630e58767b feat: ability to resolve refs using templating syntax (#1612)
* feat: resolve references using templating syntax

* refactor: moved when references are resolved to one place

* fix: linter

* docs: update map variables doc
2024-04-24 19:47:24 +00:00
c0a0faf3d3 fix: variables passed to included taskfile (#1533) 2024-03-10 17:28:04 +00:00
08a888dc8a feat: parse templates in collection-type variables (#1526)
* refactor: replacer

* feat: move traverser to deepcopy package

* feat: nested map variable templating

* refactor: ReplaceVar function

* feat: test cases

* fix: TraverseStringsFunc copy value instead of pointer
2024-03-10 17:11:07 +00:00
aff1f5316d feat: taskfile special variable (#1523) 2024-03-03 22:45:23 +00:00
1ef5cf71d0 feat: pass ast.Call by reference 2024-02-22 14:58:24 -06:00
3ff8fdbc0a feat: add ROOT_TASKFILE special variable (#1469) 2024-01-25 21:11:08 -03:00
25b1966506 feat: resolve variables in vars declarations too 2024-01-11 14:44:04 +00:00
1f3fca50b3 feat: add ability to call task with variable by reference 2024-01-11 14:44:04 +00:00
c655d90ab3 feat: add json and yaml variable constructors 2024-01-11 14:44:04 +00:00
247c2586c2 refactor: taskfile/ast package (#1450)
* refactor: ast package

* feat: read -> taskfile

* refactor: taskfile.Taskfile -> taskfile.Read

* refactor: move merge function back into taskfile package

* refactor: rename taskfile.go to read.go
2023-12-29 20:32:03 +00:00
2b67d05b9d feat: remove v2 support (#1447)
* feat: remove v2 support

* docs: update v2 schema docs
2023-12-29 20:26:02 +00:00
39a4b4d413 fix: variable propagation (#1437) 2023-12-21 16:04:45 +00:00
43a2979e77 fix: non-evaluated nil values should be converted to empty strings to avoid empty interface errors in the templater 2023-12-20 19:55:25 -06:00
5516ac1a00 feat: change Var.Value from string to an any type 2023-12-20 19:55:25 -06:00
de09e675c1 refactor: rename Var.Static to Var.Value 2023-12-20 19:55:25 -06:00
8cfac5a25a refactor: remove newlines from formatter print functions (#1137) 2023-04-26 21:20:06 -03:00
ec2110e58f Add new TASK_VERSION special variable
Closes #1014
Closes #990
2023-02-22 22:08:38 -03:00
b3627fcb18 Run Taskfiles from sub/child directories (#920) 2022-12-05 21:58:20 -03:00
f45dd11e53 Add ROOT_DIR and TASKFILE_DIR special variables
Closes #215
2022-09-03 18:14:54 -03:00
c4e10ef0aa Refactor: Add SmartJoin to handle IsAbs automatically 2022-08-06 18:19:07 -03:00
9e1d4e7855 Add golangci-lint
https://golangci-lint.run/
2022-05-15 21:30:07 -03:00
1acd59c7d6 Replace \r\n on Windows as we do for \n on Linux
Closes #717
2022-05-08 17:37:24 -03:00
de09843467 Improvements + CHANGELOG for #677 2022-03-19 18:41:03 -03:00
824b0c0132 Improve error message 2021-07-10 19:33:36 -03:00
08265ed1d7 Allow vars in dotenv paths, including environment variables
Closes #453
Closes #434
Ref #433

Co-authored-by: Andrey Nering <andrey@nering.com.br>
2021-06-05 16:00:19 -03:00
bf6d0c0a74 Improve performance of --list and --summary flags
Closes #332
2021-01-12 12:03:04 -03:00
e086b654aa Environment from .env file should be available as variables
Fixes #379
2021-01-12 11:11:40 -03:00
4afc0e8ed0 Fixed some bugs and regressions regarding dynamic variables and directories
Closes #426
2021-01-09 13:51:06 -03:00
141b377b4e Partly revert 59d2733b88
Keep the old behavior on v2
2021-01-09 10:55:18 -03:00
59d2733b88 Make dynamic variables run on the right directory
It was always running in the main Taskfile dir, even when the variable was
declared in an included taskfile in another directory or when task had a
custom dir.

Closes #384
2021-01-07 11:26:11 -03:00
2d52485d7b Watch: Clear vars cache between runs
Closes #365
2021-01-05 11:19:34 -03:00
47dd9b5a03 Move args and taskfile packages to root directory 2020-08-19 10:59:58 +02:00
fb72b46a3c github.com/go-task/task/v2 -> github.com/go-task/task/v3 2020-08-16 15:48:19 -03:00
68ce8642b1 Create v3 compiler which respects declaration order of variables
Also, fix "<no value>" been printed when a non-existing variable is printed.
2020-05-16 15:46:07 -03:00
6ed30f1add Refactor variables: Keep order of declaration
This shouldn't have any behavior changes for now. This is a code
refactor that should allow us to do further improvements on how
variables are handled, specially regarding respecting the declaration
order in Taskfiles, which should make it easier for the users.

Initial work on #218
2020-04-05 11:16:14 -03:00
7373639f57 Expose .TASK variable with the task name
Closes #252
2019-12-07 19:43:10 -03:00
0f385f9f4e remove v1 2019-08-18 17:37:21 +02:00
8efc38ad82 Use colors for some output messages 2019-05-26 18:36:39 -03:00
3cbc89769d Re-write import paths to v2 2018-11-04 21:23:35 -02:00
8bdf5c554d Fixes after updating mvdan.cc/sh 2018-09-01 11:02:23 -03:00
51998f706f Allow customizable number of expansions
Updates #66
2018-03-04 15:50:03 -03:00
1a3df08aca Allow global variables in the Taskfile
Closes #66
2018-03-04 15:39:14 -03:00
3556942516 Improve nested variables support
Closes #76 #89 #77 #83
2018-02-18 09:50:39 -03:00
87a200e42c Extract some functionality to its own packages
Like variable and template handling, and logging
2018-02-17 16:12:41 -02:00