diff --git a/dist/.github/.gitattributes b/dist/.github/.gitattributes index bb1b447..14f703f 100644 --- a/dist/.github/.gitattributes +++ b/dist/.github/.gitattributes @@ -1,5 +1,5 @@ # Ignore common files -/.* export-ignore +# /.* export-ignore # Exclude specific directory /tests/ export-ignore diff --git a/src/Service/GithubInitService.php b/src/Service/GithubInitService.php index 091427f..a3dd22c 100644 --- a/src/Service/GithubInitService.php +++ b/src/Service/GithubInitService.php @@ -33,7 +33,6 @@ public function run(): int $this->addEditorConfig(); $this->addGitAttributes(); $this->addGitIgnore(); - $this->addReadme(); $this->io->success('All work was correctly done!'); @@ -85,8 +84,8 @@ protected function addEditorConfig(): void questionMessage: 'It seems that a .editorconfig already exists, do you want to override?', overrideCommentMessage: 'Adding .editorconfig', skippedMessage: 'Skipped creation of .editorconfig', - sourceFileDirectory: $this->githubDirectoryPath, - distFileDirectory: DirectoryPath::DIST_GITHUB->value + sourceFileDirectory: '', + distFileDirectory: Path::normalize(DirectoryPath::DIST_GITHUB->value) ); } @@ -98,8 +97,8 @@ protected function addGitAttributes(): void questionMessage: 'It seems that a .gitattributes already exists, do you want to override?', overrideCommentMessage: 'Adding .gitattributes', skippedMessage: 'Skipped creation of .gitattributes', - sourceFileDirectory: $this->githubDirectoryPath, - distFileDirectory: DirectoryPath::DIST_GITHUB->value + sourceFileDirectory: '', + distFileDirectory: Path::normalize(DirectoryPath::DIST_GITHUB->value) ); } @@ -111,8 +110,8 @@ protected function addGitIgnore(): void questionMessage: 'It seems that a .gitignore already exists, do you want to override?', overrideCommentMessage: 'Adding .gitignore', skippedMessage: 'Skipped creation of .gitignore', - sourceFileDirectory: $this->githubDirectoryPath, - distFileDirectory: DirectoryPath::DIST_GITHUB->value + sourceFileDirectory: '', + distFileDirectory: Path::normalize(DirectoryPath::DIST_GITHUB->value) ); } @@ -124,7 +123,7 @@ protected function addReadme(): void questionMessage: 'It seems that a README.md already exists, do you want to override?', overrideCommentMessage: 'Adding README.md', skippedMessage: 'Skipped creation of README.md', - sourceFileDirectory: $this->githubDirectoryPath, + sourceFileDirectory: '', distFileDirectory: DirectoryPath::DIST_GITHUB->value ); } diff --git a/whitecat b/whitecat index 73497b4..076b1b9 100644 --- a/whitecat +++ b/whitecat @@ -60,6 +60,7 @@ require WHITECAT_COMPOSER_INSTALL; use Symfony\Component\Console\Application; use Whitecat\Command\DockerSetupCommand; +use Whitecat\Command\GithubInitCommand; use Whitecat\Command\GithubIssueCommand; use Whitecat\Command\GithubPullCommand; use Whitecat\Command\GithubWorkflowCommand; @@ -71,6 +72,7 @@ $application = new Application(); try { $application->add(new DockerSetupCommand()); + $application->add(new GithubInitCommand()); $application->add(new GithubIssueCommand()); $application->add(new GithubPullCommand()); $application->add(new GithubWorkflowCommand());