Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions app/config/platforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[
'key' => 'web',
'name' => 'Web',
'version' => '20.1.0',
'version' => '21.0.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
Expand Down Expand Up @@ -60,7 +60,7 @@
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '19.1.0',
'version' => '20.0.0',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
Expand All @@ -79,7 +79,7 @@
[
'key' => 'apple',
'name' => 'Apple',
'version' => '12.1.0',
'version' => '13.0.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
Expand Down Expand Up @@ -116,7 +116,7 @@
[
'key' => 'android',
'name' => 'Android',
'version' => '10.1.0',
'version' => '11.0.0',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
Expand All @@ -139,7 +139,7 @@
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.14.0',
'version' => '0.15.0',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
Expand Down Expand Up @@ -226,7 +226,7 @@
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '10.0.0',
'version' => '10.0.1',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
Expand Down Expand Up @@ -262,7 +262,7 @@
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '19.1.0',
'version' => '20.0.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
Expand All @@ -281,7 +281,7 @@
[
'key' => 'php',
'name' => 'PHP',
'version' => '17.1.0',
'version' => '17.2.0',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
Expand All @@ -300,7 +300,7 @@
[
'key' => 'python',
'name' => 'Python',
'version' => '13.1.0',
'version' => '13.2.0',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
Expand All @@ -319,7 +319,7 @@
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '18.1.0',
'version' => '19.0.0',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
Expand All @@ -338,7 +338,7 @@
[
'key' => 'go',
'name' => 'Go',
'version' => '0.12.0',
'version' => '0.13.0',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => 'https://github.com/appwrite/sdk-for-go',
'enabled' => true,
Expand All @@ -357,7 +357,7 @@
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.18.0',
'version' => '0.19.0',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
Expand All @@ -376,7 +376,7 @@
[
'key' => 'dart',
'name' => 'Dart',
'version' => '18.1.0',
'version' => '19.0.0',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
Expand All @@ -395,7 +395,7 @@
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '11.1.0',
'version' => '12.0.0',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
Expand All @@ -418,7 +418,7 @@
[
'key' => 'swift',
'name' => 'Swift',
'version' => '12.1.0',
'version' => '13.0.0',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
Expand Down
38 changes: 19 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/sdks/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 10.0.1

* Fix CLI Dart model generation issues
* Fix row permissions and security sync
* Fix error when pushing columns with relationships
* Fix resource name from attributes to columns for TablesDB indexes

## 10.0.0

* **Breaking:** Removed Avatars CLI command and all related subcommands; corresponding examples deleted
Expand Down
27 changes: 22 additions & 5 deletions src/Appwrite/Platform/Tasks/SDKs.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function action(?string $selectedPlatform, ?string $selectedSDK, ?string
// Make sure we have a clean slate.
// Otherwise, all files in this dir will be pushed,
// regardless of whether they were just generated or not.
\exec('rm -rf ' . $result);
\exec('chmod -R u+w ' . $result . ' 2>/dev/null; rm -rf ' . $result);

try {
$sdk->generate($result);
Expand Down Expand Up @@ -309,15 +309,14 @@ public function action(?string $selectedPlatform, ?string $selectedSDK, ?string
git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \
git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \
git pull origin ' . $gitBranch . ' && \
rm -rf ' . $target . '/* && \
find . -mindepth 1 ! -path "./.git*" -delete && \
cp -r ' . $result . '/. ' . $target . '/ && \
git add . && \
git commit -m "' . $message . '" && \
git push -u origin ' . $gitBranch . '
');

Console::success("Pushed {$language['name']} SDK to {$gitUrl}");

if ($createPr) {
$prTitle = "feat: {$language['name']} SDK update for version {$language['version']}";
$prBody = "This PR contains updates to the {$language['name']} SDK for version {$language['version']}.";
Expand Down Expand Up @@ -352,14 +351,32 @@ public function action(?string $selectedPlatform, ?string $selectedSDK, ?string
} else {
$errorMessage = implode("\n", $prOutput);
if (strpos($errorMessage, 'already exists') !== false) {
Console::warning("Pull request already exists for {$language['name']} SDK");
Console::warning("Pull request already exists for {$language['name']} SDK, updating title and body...");

$updateCommand = 'cd ' . $target . ' && \
gh pr edit "' . $gitBranch . '" \
--repo "' . $repoName . '" \
--title "' . $prTitle . '" \
--body "' . $prBody . '" \
2>&1';

$updateOutput = [];
$updateReturnCode = 0;
\exec($updateCommand, $updateOutput, $updateReturnCode);

if ($updateReturnCode === 0) {
Console::success("Successfully updated pull request for {$language['name']} SDK");
} else {
$updateErrorMessage = implode("\n", $updateOutput);
Console::error("Failed to update pull request for {$language['name']} SDK: " . $updateErrorMessage);
}
} else {
Console::error("Failed to create pull request for {$language['name']} SDK: " . $errorMessage);
}
}
}

\exec('rm -rf ' . $target);
\exec('chmod -R u+w ' . $target . ' && rm -rf ' . $target);
Console::success("Remove temp directory '{$target}' for {$language['name']} SDK");
}

Expand Down