fix(git-hooks): re-add

This commit is contained in:
Oliver Davies 2023-09-25 00:52:09 +01:00
parent ef928cbb3a
commit ad86e066cb
3 changed files with 2 additions and 8 deletions

View file

@ -118,10 +118,6 @@ final class CreateListOfFilesToGenerate
break; break;
} }
if ($filesToGenerate->isNotEmpty()) {
return $next([$configurationData, $configurationDataDto, $filesToGenerate]);
}
// TODO: remove? // TODO: remove?
if ($isDocker) { if ($isDocker) {
$filesToGenerate->push(new TemplateFile(data: 'common/.dockerignore', name: '.dockerignore')); $filesToGenerate->push(new TemplateFile(data: 'common/.dockerignore', name: '.dockerignore'));
@ -145,17 +141,15 @@ final class CreateListOfFilesToGenerate
$filesToGenerate[] = new TemplateFile(data: 'docker-compose.yaml', name: 'docker-compose.yaml'); $filesToGenerate[] = new TemplateFile(data: 'docker-compose.yaml', name: 'docker-compose.yaml');
} }
// TODO: re-add for each project type.
$filesToGenerate[] = new TemplateFile( $filesToGenerate[] = new TemplateFile(
data: 'git-hooks/prepare-commit-msg', data: 'common/.githooks/prepare-commit-msg',
name: 'prepare-commit-msg', name: 'prepare-commit-msg',
path: '.githooks', path: '.githooks',
); );
// TODO: re-add for each project type.
if (Arr::get($configurationData, 'experimental.runGitHooksBeforePush', false) === true) { if (Arr::get($configurationData, 'experimental.runGitHooksBeforePush', false) === true) {
$filesToGenerate[] = new TemplateFile( $filesToGenerate[] = new TemplateFile(
data: 'git-hooks/pre-push', data: 'common/.githooks/pre-push',
name: 'pre-push', name: 'pre-push',
path: '.githooks', path: '.githooks',
); );