Replies: 3 comments
-
I don't think it's possible yet.
|
Beta Was this translation helpful? Give feedback.
-
I could be missing something here, but can you not just define the version: "3"
vars:
SOME_VAR:
sh: some var command --argument task-one-example
tasks:
one:
cmds:
- task one command "{{.Some_VAR}}"
two:
cmds:
- task two command "{{.Some_VAR}}" |
Beta Was this translation helpful? Give feedback.
-
That only handles simple cases. For example, I've wanted to set a variable based on the results of running earlier tasks - in my case, capturing information about whether a test suite passed or failed. Global variables are evaluated up front, before the other tasks have any opportunity to execute. What I've ended up doing is to capture values in small text files stored in |
Beta Was this translation helpful? Give feedback.
-
I have a few tasks that use a similar command to set a dynamic variable. I would like to abstract that command into an internal task instead of repeating it.
Example:
I'd to either use a task to set
SOME_VAR
or call a task in mycmds
or as in mydeps
and have that setSOME_VAR
. Is this possible?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions