Open evs-xsarus opened 1 month ago
Hello @evs-xsarus,
That would be possible. We do a similir thing for the ComposerRequireChecker
task.
However : since we are now filtering triggered_by
as extensions, it would be considered a BC break.
Maybe an alternate solution could be to introduce a new parameter for this specific case? Something like triggered_by_filenames
(which will use the $files->names()
filter)?
Feel free to propose changes in a PR.
Due to the use of dockers, my grump config only uses shell tasks , example:
Most of these tasks start properly when PHP files are changed as per documentation https://github.com/phpro/grumphp/blob/v2.x/doc/tasks/shell.md for triggered_by .
Sadly, the
composer validate
is not triggered if only composer.json/composer.lock is changed. I can add these:But that means the task will run even if a non-related json or lock file is changed.
To avoid this, specifying a complete filename should help as in this example:
or even with wildcards:
As you can see in my example, I've duplicate tasks but for different folders. The path should be definable too in triggered by, full example: