Implement creator studio and upload updates
This commit is contained in:
33
app/Console/Commands/ListSitemapReleasesCommand.php
Normal file
33
app/Console/Commands/ListSitemapReleasesCommand.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Sitemaps\SitemapReleaseManager;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
final class ListSitemapReleasesCommand extends Command
|
||||
{
|
||||
protected $signature = 'skinbase:sitemaps:releases';
|
||||
|
||||
protected $description = 'List recent sitemap releases and the active release.';
|
||||
|
||||
public function handle(SitemapReleaseManager $releases): int
|
||||
{
|
||||
$active = $releases->activeReleaseId();
|
||||
|
||||
foreach ($releases->listReleases() as $release) {
|
||||
$this->line(sprintf(
|
||||
'%s status=%s families=%d published_at=%s%s',
|
||||
(string) ($release['release_id'] ?? 'unknown'),
|
||||
(string) ($release['status'] ?? 'unknown'),
|
||||
(int) data_get($release, 'totals.families', 0),
|
||||
(string) ($release['published_at'] ?? 'n/a'),
|
||||
(string) ($release['release_id'] ?? '') === $active ? ' [active]' : '',
|
||||
));
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user