Replies: 1 comment
|
There is no current declaration that means “run this task and then assert that a second run would be up to date.” The existing You can remove repetition by defining one internal CI wrapper per public task (or generate these wrappers if you have many): version: '3'
tasks:
build:
sources: ['src/**']
generates: ['dist/**']
cmds:
- ./build.sh
ci:build-idempotent:
internal: true
cmds:
- task: build
- '{{.TASK_EXE}} --status build'Then CI runs only: task ci:build-idempotentThe second command does not execute One important limit: this verifies the So there is not a hidden shorter flag that combines both phases today; wrapping |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
On project with multiple developers we are unlikely to be able to have a single person gating changes made to taskfiles and even if we would do, it is too easy to introduce dependency errors which would make task run when they should not.
To address this one could try to modify how tasks are run on CI to cause failures if on second consecutive run they do not report
up-to-date.The issue is that the boilerplate code needed for doing this is really ugly
task build && task build --statusIs there a better/easier way to implement this?
Ideally we should be able to declare which tasks are supposed to behave like this and task would do the checking at the end by itself. Such feature would make much easier to maintain task files.
All reactions