Skip to content

Commit

Permalink
initi
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed May 14, 2024
1 parent 7e08674 commit e1ebe53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Cli/AbstractCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,10 @@ public function cleanUpInitialBoilerplate(string $destination): void
{
$this->cliLog('--------------------------------------------------', 'C');
$this->cliLog('Removing initial boilerplate setup files', 'C');
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm -rf .github\");' --quiet");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CODE_OF_CONDUCT.md\");' --quiet");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CHANGELOG.md\");' --quiet");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm LICENSE.md\");' --quiet");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm -rf .github\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CODE_OF_CONDUCT.md\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CHANGELOG.md\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm LICENSE.md\");'");
}

/**
Expand Down
7 changes: 6 additions & 1 deletion src/Init/InitThemeSetupCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,13 @@ public function __invoke(array $args, array $assocArgs)
$this->cliLog("Changing the setup theme to the new theme name", 'C');
\rename($destionation, $newDestionation); // phpcs:ignore WordPress.WP.AlternativeFunctions.rename_rename

WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm -rf .github\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CODE_OF_CONDUCT.md\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm CHANGELOG.md\");'");
WP_CLI::runcommand("eval 'shell_exec(\"cd {$destination} && rm LICENSE.md\");'");

$this->initMandatoryAfter($assocArgs[self::ARG_LIBS_VERSION], $newDestionation);
$this->cleanUpInitialBoilerplate($newDestionation);
// $this->cleanUpInitialBoilerplate($newDestionation);

$this->cliLog('--------------------------------------------------', 'C');
$this->cliLog("Activating new theme", 'C');
Expand Down

0 comments on commit e1ebe53

Please sign in to comment.