-
Notifications
You must be signed in to change notification settings - Fork 439
Set path and/or full filename in triggered_by #1157
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
Comments
Hello @evs-xsarus, That would be possible. We do a similir thing for the Feel free to propose changes in a PR. |
@veewee could you have a look at my draft MR? |
@veewee I've refactored a bit and applied the same approach as in SymfonyConsole. That whilelist + ignore pattern works great as can be tested with this configuration: grumphp:
process_timeout: 360
tasks:
magento_composer:
triggered_by: ['json', 'lock']
whitelist_patterns:
- "#^magento/composer.json#"
- "#^magento/composer.lock#"
scripts:
- ["-c", "/usr/local/bin/composer2 --working-dir=./magento validate"]
metadata:
task: shell |
@veewee does this refactored approach work for you? |
…lenames Ticket #1157: support specific filenames as trigger for Shell.
@veewee do you have an ETA for the next release so I can start using this ? |
Hopefully next week |
It's released ;) |
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:
The text was updated successfully, but these errors were encountered: