Skip to content

Commit

Permalink
Set the console output in session so it can be used by actions
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Oct 28, 2022
1 parent 952e78c commit 587757a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/framework/src/Console/Commands/BuildSiteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
use Hyde\Framework\Features\BuildTasks\PostBuildTasks\GenerateRssFeed;
use Hyde\Framework\Features\BuildTasks\PostBuildTasks\GenerateSearch;
use Hyde\Framework\Features\BuildTasks\PostBuildTasks\GenerateSitemap;
use Hyde\Framework\Features\Session\Session;
use Hyde\Framework\Services\BuildService;
use Hyde\Framework\Services\BuildTaskService;
use Hyde\Framework\Services\DiscoveryService;
use Hyde\Hyde;
use Illuminate\Support\Facades\Config;
use LaravelZero\Framework\Commands\Command;
use function app;

/**
* Hyde Command to run the Build Process.
Expand Down Expand Up @@ -95,11 +97,15 @@ public function runPostBuildActions(): void
$this->runNodeCommand('npm run prod', 'Building frontend assets for production!');
}

app(Session::class)->put('console-output', $this->output);

$service->runIf(GenerateSitemap::class, $this->canGenerateSitemap());
$service->runIf(GenerateRssFeed::class, $this->canGenerateFeed());
$service->runIf(GenerateSearch::class, $this->canGenerateSearch());

$service->runPostBuildTasks();

app(Session::class)->forget('console-output');
}

protected function printFinishMessage(float $time_start): void
Expand Down

0 comments on commit 587757a

Please sign in to comment.