From 56be7024ae673ed8b082e1f9290f22bc2ca46343 Mon Sep 17 00:00:00 2001 From: Trusted97 Date: Mon, 18 Mar 2024 11:43:23 +0100 Subject: [PATCH 1/4] feat: add github init command --- whitecat | 2 ++ 1 file changed, 2 insertions(+) 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()); From 34d867db0588daca366568daa076bb415fcd5422 Mon Sep 17 00:00:00 2001 From: Trusted97 Date: Mon, 18 Mar 2024 11:52:14 +0100 Subject: [PATCH 2/4] chore: removed double readme function --- src/Service/GithubInitService.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Service/GithubInitService.php b/src/Service/GithubInitService.php index 091427f..d7f9217 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!'); From 5a7b0e3cd1c579ea260077156a840ba0bc7aec31 Mon Sep 17 00:00:00 2001 From: Trusted97 Date: Mon, 18 Mar 2024 12:12:09 +0100 Subject: [PATCH 3/4] chore: changed source directory --- src/Service/GithubInitService.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Service/GithubInitService.php b/src/Service/GithubInitService.php index d7f9217..a3dd22c 100644 --- a/src/Service/GithubInitService.php +++ b/src/Service/GithubInitService.php @@ -84,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) ); } @@ -97,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) ); } @@ -110,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) ); } @@ -123,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 ); } From d5bfd05f20080b5470c66d3df63345bf1320a2a8 Mon Sep 17 00:00:00 2001 From: Trusted97 Date: Mon, 18 Mar 2024 12:17:10 +0100 Subject: [PATCH 4/4] chore: minor --- dist/.github/.gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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