bug fixes

This commit is contained in:
Matej Bačo
2024-12-02 13:45:03 +01:00
parent 4a117adb28
commit 2ef1cf5da0
2 changed files with 13 additions and 13 deletions
@@ -871,21 +871,21 @@ class Builds extends Action
return $deployment->getAttribute('commands', '');
} elseif ($resource->getCollection() === 'sites') {
$commands = [];
$commands[] = $deployment->getAttribute('installCommand', '');
$commands[] = $deployment->getAttribute('buildCommand', '');
$frameworks = Config::getParam('frameworks', []);
$framework = $frameworks[$resource->getAttribute('framework', '')] ?? null;
if(!is_null($framework)) {
if (!is_null($framework)) {
$adapter = ($framework['adapters'] ?? [])[$resource->getAttribute('adapter', '')] ?? null;
if(!is_null($adapter) && isset($adapter['bundleCommand'])) {
if (!is_null($adapter) && isset($adapter['bundleCommand'])) {
$commands[] = $adapter['bundleCommand'];
}
}
$commands = array_filter($commands, fn($command) => !empty($command));
$commands = array_filter($commands, fn ($command) => !empty($command));
return implode(' && ', $commands);
}