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.')); } }