public function RoboFile::gitPreCommit in Panopoly 7
Perform pre-commit checks. Intended to be run as a Git pre-commit hook.
File
- ./
RoboFile.php, line 298
Class
- RoboFile
- This is project's console commands configuration for Robo task runner.
Code
public function gitPreCommit() {
// @todo This should really use 'git show :FILE' to get the current file from the index rather than disk
if (file_get_contents(__DIR__ . '/drupal-org.make') !== $this
->getDrupalOrgMakeContents()) {
throw new \Exception("drupal-org.make contents out-of-date! Run 'robo build:drupal-org-make'");
}
}