mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Move outputDirectory initialization before conditional flow
This commit is contained in:
parent
04d6693803
commit
4b98544112
1 changed files with 2 additions and 2 deletions
|
|
@ -686,6 +686,7 @@ class Builds extends Action
|
|||
if ($version === 'v2') {
|
||||
$command = 'tar -zxf /tmp/code.tar.gz -C /usr/code && cd /usr/local/src/ && ./build.sh';
|
||||
} else {
|
||||
$outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory');
|
||||
if ($resource->getCollection() === 'sites') {
|
||||
$listFilesCommand = '';
|
||||
|
||||
|
|
@ -693,7 +694,6 @@ class Builds extends Action
|
|||
$listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build';
|
||||
|
||||
// Enter output directory, if set
|
||||
$outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory');
|
||||
if (!empty($outputDirectory)) {
|
||||
$listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory'));
|
||||
}
|
||||
|
|
@ -726,7 +726,7 @@ class Builds extends Action
|
|||
destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}",
|
||||
variables: $vars,
|
||||
command: $command,
|
||||
outputDirectory: $resource->getAttribute('outputDirectory', '')
|
||||
outputDirectory: $outputDirectory ?? ''
|
||||
);
|
||||
|
||||
Console::log('createRuntime finished');
|
||||
|
|
|
|||
Loading…
Reference in a new issue