Replies: 1 comment 1 reply
-
@klauern Another way to do something like this could be: run-local:
desc: Run locally on a single service
cmds:
- task: run
preconditions:
- sh: '{{ if not .ACCOUNT }}exit 1;{{ end }}'
msg: Must supply an account ID (e.g., `task run-local ACCOUNT=12345678`)
- sh: '{{ if not .SERVICE }}exit 1;{{ end }}'
msg: Must supply a service name (e.g., `task run-local SERVICE=thing`) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a task file that checks for a set variable as part of a
precondition
.I discovered that variables were being set to
<no value>
, but I am not sure if that's a realible means to test for this. As the precondition is based on a shell command, I am essentially escaping the Taskfile to test for a variable that is set externally, when it could be referenced locally. Is there an equivalent precondition check that I can use to validate that a variable has been set correctly? Will<no value>
be reliably set everywhere?Beta Was this translation helpful? Give feedback.
All reactions