Update create deployment default commands
Default to function commands only if commands weren't supplied.
This commit is contained in:
parent
87b0851092
commit
605ee2f7c5
2 changed files with 2 additions and 4 deletions
|
@ -1062,11 +1062,9 @@ App::post('/v1/functions/:functionId/deployments')
|
|||
}
|
||||
|
||||
if ($commands === null) {
|
||||
$commands = $function->getAttribute('entrypoint', '');
|
||||
$commands = $function->getAttribute('commands', '');
|
||||
}
|
||||
|
||||
$commands = $function->getAttribute('commands', '');
|
||||
|
||||
if (empty($entrypoint)) {
|
||||
throw new Exception(Exception::FUNCTION_ENTRYPOINT_MISSING);
|
||||
}
|
||||
|
|
|
@ -615,7 +615,7 @@ class V19 extends Migration
|
|||
{
|
||||
$runtime = $function->getAttribute('runtime');
|
||||
$language = explode('-', $runtime)[0];
|
||||
$commands = match($language) {
|
||||
$commands = match ($language) {
|
||||
'dart' => 'dart pub get',
|
||||
'deno' => 'deno cache ' . $function->getAttribute('entrypoint'),
|
||||
'dotnet' => 'dotnet restore',
|
||||
|
|
Loading…
Reference in a new issue