Files
newznab-tmux/build/git-hooks/pre-commit
T
2020-02-04 11:20:55 +00:00

17 lines
453 B
PHP
Executable File

#!/usr/bin/env php
<?php
$autoLoader = __DIR__ . '/../../vendor/autoload.php';
if (!file_exists($autoLoader)) {
fwrite(STDERR, 'Composer autoload.php could not be found');
exit(1);
}
require $autoLoader;
$config = realpath(__DIR__ . '/../../captainhook.json');
$app = new CaptainHook\App\Console\Application\Hook();
$app->setHook('pre-commit');
$app->setConfigFile($config);
$app->setRepositoryPath(dirname(dirname(__DIR__)));
$app->run();