inti project
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Support\Release\ReleaseReadinessGate;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class ReleaseReadinessGateCommand extends Command
|
||||
{
|
||||
protected $signature = 'app:release-readiness-gate {--warning-mode}';
|
||||
protected $description = 'Evaluate modular release readiness artifacts and gates.';
|
||||
|
||||
public function handle(ReleaseReadinessGate $gate): int
|
||||
{
|
||||
$result = $gate->evaluate();
|
||||
$this->line(json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
|
||||
|
||||
if ($result['status'] !== 'pass') {
|
||||
$this->warn('Release readiness gate failed. Fix artifacts or run in warning mode only for early rollout rehearsals.');
|
||||
return $this->option('warning-mode') ? self::SUCCESS : self::FAILURE;
|
||||
}
|
||||
|
||||
$this->info('Release readiness gate passed. Disturbingly competent.');
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user