mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fix bugs after merge
This commit is contained in:
parent
507b2d978a
commit
bf5855d101
3 changed files with 7 additions and 5 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit dd6555abd460b55be996d9d8e10c95801e8bf662
|
Subproject commit 2f4e16038db4968371ef3a5b1189294d3dc60788
|
||||||
|
|
@ -574,7 +574,7 @@ App::put('/v1/functions/:functionId')
|
||||||
// activate the deployment for first run of a VCS repo
|
// activate the deployment for first run of a VCS repo
|
||||||
if ($needToDeploy) {
|
if ($needToDeploy) {
|
||||||
$deploymentId = ID::unique();
|
$deploymentId = ID::unique();
|
||||||
$entrypoint = 'index.js'; //TODO: Read from function settings
|
$entrypoint = $function->getAttribute('entrypoint', '');
|
||||||
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
||||||
|
|
||||||
//Add document in VCS repos collection
|
//Add document in VCS repos collection
|
||||||
|
|
@ -608,6 +608,8 @@ App::put('/v1/functions/:functionId')
|
||||||
'resourceId' => $function->getId(),
|
'resourceId' => $function->getId(),
|
||||||
'resourceType' => 'functions',
|
'resourceType' => 'functions',
|
||||||
'entrypoint' => $entrypoint,
|
'entrypoint' => $entrypoint,
|
||||||
|
'buildCommand' => $buildCommand,
|
||||||
|
'installCommand' => $installCommand,
|
||||||
'type' => 'vcs',
|
'type' => 'vcs',
|
||||||
'vcsInstallationId' => $installation->getId(),
|
'vcsInstallationId' => $installation->getId(),
|
||||||
'vcsInstallationInternalId' => $installation->getInternalId(),
|
'vcsInstallationInternalId' => $installation->getInternalId(),
|
||||||
|
|
@ -960,6 +962,8 @@ App::post('/v1/functions/:functionId/deployments')
|
||||||
'resourceId' => $function->getId(),
|
'resourceId' => $function->getId(),
|
||||||
'resourceType' => 'functions',
|
'resourceType' => 'functions',
|
||||||
'entrypoint' => $entrypoint,
|
'entrypoint' => $entrypoint,
|
||||||
|
'buildCommand' => $buildCommand,
|
||||||
|
'installCommand' => $installCommand,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'size' => $fileSize,
|
'size' => $fileSize,
|
||||||
'chunksTotal' => $chunks,
|
'chunksTotal' => $chunks,
|
||||||
|
|
|
||||||
|
|
@ -274,8 +274,6 @@ class BuildsV1 extends Worker
|
||||||
|
|
||||||
$command = \str_replace('"', '\\"', $command);
|
$command = \str_replace('"', '\\"', $command);
|
||||||
|
|
||||||
\var_dump($path);
|
|
||||||
|
|
||||||
$response = $this->executor->createRuntime(
|
$response = $this->executor->createRuntime(
|
||||||
projectId: $project->getId(),
|
projectId: $project->getId(),
|
||||||
deploymentId: $deployment->getId(),
|
deploymentId: $deployment->getId(),
|
||||||
|
|
@ -289,7 +287,7 @@ class BuildsV1 extends Worker
|
||||||
commands: [
|
commands: [
|
||||||
'sh', '-c',
|
'sh', '-c',
|
||||||
'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"'
|
'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"'
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
$endTime = DateTime::now();
|
$endTime = DateTime::now();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue