addressing comments
This commit is contained in:
parent
ab0d5b509b
commit
f00cc06daf
8 changed files with 17 additions and 17 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -65,19 +65,19 @@ class SDKs extends Action
|
||||||
|
|
||||||
Console::info('Fetching API Spec for ' . $language['name'] . ' for ' . $platform['name'] . ' (version: ' . $version . ')');
|
Console::info('Fetching API Spec for ' . $language['name'] . ' for ' . $platform['name'] . ' (version: ' . $version . ')');
|
||||||
|
|
||||||
$spec = file_get_contents(__DIR__ . '/../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json');
|
$spec = file_get_contents(__DIR__ . '/../../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json');
|
||||||
|
|
||||||
$cover = 'https://appwrite.io/images/github.png';
|
$cover = 'https://appwrite.io/images/github.png';
|
||||||
$result = \realpath(__DIR__ . '/../../../app') . '/sdks/' . $key . '-' . $language['key'];
|
$result = \realpath(__DIR__ . '/../../../../app') . '/sdks/' . $key . '-' . $language['key'];
|
||||||
$resultExamples = \realpath(__DIR__ . '/../../..') . '/docs/examples/' . $version . '/' . $key . '-' . $language['key'];
|
$resultExamples = \realpath(__DIR__ . '/../../../..') . '/docs/examples/' . $version . '/' . $key . '-' . $language['key'];
|
||||||
$target = \realpath(__DIR__ . '/../../../app') . '/sdks/git/' . $language['key'] . '/';
|
$target = \realpath(__DIR__ . '/../../../../app') . '/sdks/git/' . $language['key'] . '/';
|
||||||
$readme = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/README.md');
|
$readme = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/README.md');
|
||||||
$readme = ($readme) ? \file_get_contents($readme) : '';
|
$readme = ($readme) ? \file_get_contents($readme) : '';
|
||||||
$gettingStarted = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md');
|
$gettingStarted = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/GETTING_STARTED.md');
|
||||||
$gettingStarted = ($gettingStarted) ? \file_get_contents($gettingStarted) : '';
|
$gettingStarted = ($gettingStarted) ? \file_get_contents($gettingStarted) : '';
|
||||||
$examples = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/EXAMPLES.md');
|
$examples = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/EXAMPLES.md');
|
||||||
$examples = ($examples) ? \file_get_contents($examples) : '';
|
$examples = ($examples) ? \file_get_contents($examples) : '';
|
||||||
$changelog = \realpath(__DIR__ . '/../../../docs/sdks/' . $language['key'] . '/CHANGELOG.md');
|
$changelog = \realpath(__DIR__ . '/../../../../docs/sdks/' . $language['key'] . '/CHANGELOG.md');
|
||||||
$changelog = ($changelog) ? \file_get_contents($changelog) : '# Change Log';
|
$changelog = ($changelog) ? \file_get_contents($changelog) : '# Change Log';
|
||||||
$warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check [previous releases](' . $language['url'] . '/releases).**';
|
$warning = '**This SDK is compatible with Appwrite server version ' . $version . '. For older versions, please check [previous releases](' . $language['url'] . '/releases).**';
|
||||||
$license = 'BSD-3-Clause';
|
$license = 'BSD-3-Clause';
|
||||||
|
|
|
@ -40,8 +40,8 @@ class Specs extends Action
|
||||||
|
|
||||||
public function action(string $version, string $mode, Registry $register): void
|
public function action(string $version, string $mode, Registry $register): void
|
||||||
{
|
{
|
||||||
$db = $register->get('db');
|
//$db = $register->get('db');
|
||||||
$redis = $register->get('cache');
|
//$redis = $register->get('cache');
|
||||||
$appRoutes = App::getRoutes();
|
$appRoutes = App::getRoutes();
|
||||||
$response = new Response(new HttpResponse());
|
$response = new Response(new HttpResponse());
|
||||||
$mocks = ($mode === 'mocks');
|
$mocks = ($mode === 'mocks');
|
||||||
|
@ -266,7 +266,7 @@ class Specs extends Action
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$path = __DIR__ . '/../../../app/config/specs/' . $format . '-' . $version . '-' . $platform . '.json';
|
$path = __DIR__ . '/../../../../app/config/specs/' . $format . '-' . $version . '-' . $platform . '.json';
|
||||||
|
|
||||||
if (!file_put_contents($path, json_encode($specs->parse()))) {
|
if (!file_put_contents($path, json_encode($specs->parse()))) {
|
||||||
throw new Exception('Failed to save spec file: ' . $path);
|
throw new Exception('Failed to save spec file: ' . $path);
|
||||||
|
|
Loading…
Reference in a new issue