| @@ 70-94 (lines=25) @@ | ||
| 67 | . "<info>♣♣♣</info> Docweaver DocumentationPublisher \n" |
|
| 68 | . 'Help is here, try: php artisan docweaver:publish --help'); |
|
| 69 | ||
| 70 | if ($skipConfirmation || $this->confirm($confirmationMessage)) { |
|
| 71 | $this->info("Publishing {$productName}.\nT: " . Carbon::now()->toCookieString() . "\n----------"); |
|
| 72 | ||
| 73 | $result = $this->publisher->publish($productName, $productSource, $this); |
|
| 74 | ||
| 75 | if ($result->isSuccess()) { |
|
| 76 | $this->info(PHP_EOL . '----------'); |
|
| 77 | $this->comment("<info>✔</info> Done. {$result->getMessage()}"); |
|
| 78 | ||
| 79 | // Display results |
|
| 80 | $this->line(''); |
|
| 81 | $headers = ['Time', 'Versions', 'Published', 'Updated']; |
|
| 82 | $data = $result->getData(); |
|
| 83 | $rows = [[ |
|
| 84 | $data->executionTime, |
|
| 85 | count($data->versions), |
|
| 86 | count($data->versionsPublished), |
|
| 87 | count($data->versionsUpdated), |
|
| 88 | ]]; |
|
| 89 | $this->table($headers, $rows); |
|
| 90 | $this->line(PHP_EOL); |
|
| 91 | } else { |
|
| 92 | $this->line(PHP_EOL . "<error>✘</error> {$result->getError()}"); |
|
| 93 | } |
|
| 94 | } |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| @@ 64-88 (lines=25) @@ | ||
| 61 | . "<info>♣♣♣</info> Docweaver DocumentationPublisher \n" |
|
| 62 | . 'Help is here, try: php artisan docweaver:update --help'); |
|
| 63 | ||
| 64 | if ($skipConfirmation || $this->confirm($confirmationMessage)) { |
|
| 65 | $this->info("Updating {$productName}.\nT: " . Carbon::now()->toCookieString() . "\n----------"); |
|
| 66 | ||
| 67 | $result = $this->publisher->update($productName, $this); |
|
| 68 | ||
| 69 | if ($result->isSuccess()) { |
|
| 70 | $this->info(PHP_EOL . '----------'); |
|
| 71 | $this->comment("<info>✔</info> Done. {$result->getMessage()}"); |
|
| 72 | ||
| 73 | // Display results |
|
| 74 | $this->line(''); |
|
| 75 | $headers = ['Time', 'Versions', 'Published', 'Updated']; |
|
| 76 | $data = $result->getData(); |
|
| 77 | $rows = [[ |
|
| 78 | $data->executionTime, |
|
| 79 | count($data->versions), |
|
| 80 | count($data->versionsPublished), |
|
| 81 | count($data->versionsUpdated), |
|
| 82 | ]]; |
|
| 83 | $this->table($headers, $rows); |
|
| 84 | $this->line(PHP_EOL); |
|
| 85 | } else { |
|
| 86 | $this->line(PHP_EOL . "<error>✘</error> {$result->getError()}"); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||