mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #10571 from appwrite/fix-builds-worker-output-directory
fix(builds-worker): Use outputDirectory attribute from deployment
This commit is contained in:
commit
e244cb2f02
1 changed files with 4 additions and 3 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,8 +694,8 @@ class Builds extends Action
|
|||
$listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build';
|
||||
|
||||
// Enter output directory, if set
|
||||
if (!empty($resource->getAttribute('outputDirectory', ''))) {
|
||||
$listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory', ''));
|
||||
if (!empty($outputDirectory)) {
|
||||
$listFilesCommand .= ' && cd ' . \escapeshellarg($outputDirectory);
|
||||
}
|
||||
|
||||
// Print files, and end separation
|
||||
|
|
@ -725,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