Skip to content

Commit

Permalink
Merge branch '1.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Mar 12, 2024
2 parents f3cb7ab + 3c70df5 commit d8f5515
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/workbench`.

## 1.4.0

Released: 2024-03-12

### Changes

* Swap `workbench:install` with `workbench:devtool` for smaller installation footprint.

## 1.3.0

Released: 2024-03-03
Expand Down
11 changes: 9 additions & 2 deletions src/Console/DevToolCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class DevToolCommand extends Command
*
* @var string
*/
protected $signature = 'workbench:devtool {--force : Overwrite any existing files}';
protected $signature = 'workbench:devtool
{--force : Overwrite any existing files}
{--skip-install : Skipped Workbench installation}';

/**
* Execute the console command.
Expand All @@ -42,7 +44,12 @@ public function handle(Filesystem $filesystem)
$this->prepareWorkbenchDirectories($filesystem, $workingPath);
$this->prepareWorkbenchNamespaces($filesystem, $workingPath);

$this->call('workbench:devtool', ['--force' => $this->option('force')]);
if (! $this->option('skip-install')) {
$this->call('workbench:install', [
'--force' => $this->option('force'),
'--skip-devtool' => true,
]);
}

return tap(Command::SUCCESS, function ($exitCode) use ($filesystem, $workingPath) {
event(new InstallEnded($this->input, $this->output, $this->components, $exitCode));
Expand Down
11 changes: 10 additions & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class InstallCommand extends Command
*
* @var string
*/
protected $signature = 'workbench:install {--force : Overwrite any existing files}';
protected $signature = 'workbench:install
{--force : Overwrite any existing files}
{--skip-devtool : Skipped DevTool installation}';

/**
* Execute the console command.
Expand All @@ -29,6 +31,13 @@ class InstallCommand extends Command
*/
public function handle(Filesystem $filesystem)
{
if (! $this->option('skip-devtool')) {
$this->call('workbench:devtool', [
'--force' => $this->option('force'),
'--skip-install' => true,
]);
}

$workingPath = package_path();

$this->copyTestbenchConfigurationFile($filesystem, $workingPath);
Expand Down

0 comments on commit d8f5515

Please sign in to comment.