Skip to content

Commit

Permalink
fix(core): update environment variable generation logic in Applicatio…
Browse files Browse the repository at this point in the history
…nDeploymentJob to handle different build packs
  • Loading branch information
andrasbacsai committed Jan 22, 2025
1 parent bae8b9a commit c3c032e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/Jobs/ApplicationDeploymentJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2288,8 +2288,12 @@ private function start_by_compose_file()

private function generate_build_env_variables()
{
$variables = collect($this->nixpacks_plan_json->get('variables'));
$variables->put('SOURCE_COMMIT', $this->commit);
if ($this->application->build_pack === 'nixpacks') {
$variables = collect($this->nixpacks_plan_json->get('variables'));
} else {
$this->generate_env_variables();
$variables = collect([])->merge($this->env_args);
}

$this->build_args = $variables->map(function ($value, $key) {
$value = escapeshellarg($value);
Expand Down

0 comments on commit c3c032e

Please sign in to comment.