-
-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify minimum required task verison. #872
Comments
I came here looking for this feature as well. I have a workaround that works for my use case, but it's not the prettiest: # Specify your desired major version
version: 3
vars:
TASK_MINOR_VERSION:
# Store the current minor version of task in an environment variable
sh: echo "{{.TASK_VERSION}}" | awk -F. '{print $2}'
tasks:
default:
preconditions:
# Ensure we have at least version 3.28
- sh: 'test {{.TASK_MINOR_VERSION}} -ge 28' |
Note, that if you try this: version: 3.28 You get this error:
|
Is this a duplicate of #796 ? |
Merged
Since #796 is closed, I'd just like to note that this issue is still not fixed. |
wonderful, thank you @vmaerten ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While the
version:
key is nice to specify the Taskfile schema version, it would be nice to have some option to define a minimum required task version to run a task.For example, a recent change introduced
.ROOT_DIR
, which is incredibly handy for how I leverage task for my team, but many of my devs are stumbling over that as they haven't bothered to upgrade task yet.I propopse that in in taskfiles, the
version:
key be expanded to check for minimum task version.Example:
would be compatible with all 3.x taskfile releases, but...
would cause
task
to exit non-zero if the task version isn't at least 3.15.2.The text was updated successfully, but these errors were encountered: