From c5588b21b47d2dd706923cb26a497a630c64a3e1 Mon Sep 17 00:00:00 2001 From: Mehran Date: Wed, 4 Oct 2023 19:36:28 +0300 Subject: [PATCH] Updated the command names for the beta release --- .../{ShipCommand.php => ProvisionCommand.php} | 12 ++++++++---- .../{TerminateCommand.php => TearDownCommand.php} | 8 ++++---- 2 files changed, 12 insertions(+), 8 deletions(-) rename app/Commands/{ShipCommand.php => ProvisionCommand.php} (80%) rename app/Commands/{TerminateCommand.php => TearDownCommand.php} (78%) diff --git a/app/Commands/ShipCommand.php b/app/Commands/ProvisionCommand.php similarity index 80% rename from app/Commands/ShipCommand.php rename to app/Commands/ProvisionCommand.php index 94a42b9..d93e636 100644 --- a/app/Commands/ShipCommand.php +++ b/app/Commands/ProvisionCommand.php @@ -29,15 +29,16 @@ use App\Services\Forge\Pipeline\UpdateEnvironmentVariables; use App\Traits\Outputifier; use Illuminate\Support\Facades\Pipeline; +use Illuminate\Support\Facades\URL; use LaravelZero\Framework\Commands\Command; -class ShipCommand extends Command +class ProvisionCommand extends Command { use Outputifier; - protected $signature = 'ship'; + protected $signature = 'provision'; - protected $description = 'Prepares the preview environment for your project.'; + protected $description = 'Prepare and deploy a testable preview environment on a new site.'; public function handle(ForgeService $service): void { @@ -57,6 +58,9 @@ public function handle(ForgeService $service): void RunOptionalCommands::class, EnsureJobScheduled::class, ]) - ->then(fn () => $this->success('Provision complete!')); + ->then(function () use ($service) { + $this->success('Provisioning complete! Your environment is now set up and ready to use.'); + $this->success('www.' . $service->site->name); + }); } } diff --git a/app/Commands/TerminateCommand.php b/app/Commands/TearDownCommand.php similarity index 78% rename from app/Commands/TerminateCommand.php rename to app/Commands/TearDownCommand.php index 1a9a6cb..f17d9f6 100644 --- a/app/Commands/TerminateCommand.php +++ b/app/Commands/TearDownCommand.php @@ -24,13 +24,13 @@ use Illuminate\Support\Facades\Pipeline; use LaravelZero\Framework\Commands\Command; -class TerminateCommand extends Command +class TearDownCommand extends Command { use Outputifier; - protected $signature = 'terminate'; + protected $signature = 'teardown'; - protected $description = 'Terminates the preview environment site.'; + protected $description = 'Removes the provisioned environment, reversing the setup process.'; public function handle(ForgeService $service): void { @@ -43,6 +43,6 @@ public function handle(ForgeService $service): void RemoveDatabaseUser::class, DestroySite::class, ]) - ->then(fn () => $this->success('Provision complete!')); + ->then(fn () => $this->success('Environment teardown successful! All provisioned resources have been removed.')); } }