diff --git a/app/config/platforms.php b/app/config/platforms.php index 1368caea52..15eb8b3893 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -217,7 +217,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '8.2.1', + 'version' => '8.2.2', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -231,6 +231,7 @@ return [ 'gitRepoName' => 'sdk-for-cli', 'gitUserName' => 'appwrite', 'gitBranch' => 'dev', + 'repoBranch' => 'master', 'exclude' => [ 'services' => [ ['name' => 'assistant'], diff --git a/composer.lock b/composer.lock index 79953a912c..ea3b3459a6 100644 --- a/composer.lock +++ b/composer.lock @@ -4810,16 +4810,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.41.16", + "version": "0.41.17", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "0b01a3917c2f08f7671efe17bd631bb491d8efac" + "reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/0b01a3917c2f08f7671efe17bd631bb491d8efac", - "reference": "0b01a3917c2f08f7671efe17bd631bb491d8efac", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ef5e9d952032deecffee7f825a941c40ed4c84b8", + "reference": "ef5e9d952032deecffee7f825a941c40ed4c84b8", "shasum": "" }, "require": { @@ -4855,9 +4855,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/0.41.16" + "source": "https://github.com/appwrite/sdk-generator/tree/0.41.17" }, - "time": "2025-07-18T07:26:58+00:00" + "time": "2025-07-18T08:18:48+00:00" }, { "name": "doctrine/annotations", diff --git a/docs/sdks/cli/CHANGELOG.md b/docs/sdks/cli/CHANGELOG.md index 4512cce0de..e32614cad0 100644 --- a/docs/sdks/cli/CHANGELOG.md +++ b/docs/sdks/cli/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## 8.2.2 + +* Fix object comparison logic when pushing settings +* Type generation fixes: + * Dart: Fixed import casing to snake_case, removed `extends Document` and hardcoded attributes, removed unnecessary imports + * Java: Fixed indentation to 4 spaces, updated imports to `java.util.Objects`, fixed enum casing in strict mode as per [Oracle official docs](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html) + * Javascript: Updated optional values formatting from `|null` to `| null` + * Kotlin: Fixed indentation to 4 spaces per [Kotlinlang official docs](https://kotlinlang.org/docs/coding-conventions.html#indentation) + * PHP: Fixed indentation to 4 spaces per [PHP Fig official docs](https://www.php-fig.org/psr/psr-2/) + * Swift: Fixed indentation to 4 spaces, improved `decodeIfPresent` usage for optionals, added missing `public` to `init` method + * Typescript: Fixed indentation to 4 spaces per [Typescript coding guidelines](https://github.com/microsoft/TypeScript/wiki/Coding-guidelines) + ## 8.2.1 * Added `--with-variables` option to the Sites command for adding/updating environment variables diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index ea73af541c..755dfac627 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -272,6 +272,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND $gitUrl = 'git@github.com:aw-tests/' . $language['gitRepoName'] . '.git'; } + $branch = $language['repoBranch'] ?? 'main'; if ($git && !empty($gitUrl)) { \exec('rm -rf ' . $target . ' && \ mkdir -p ' . $target . ' && \ @@ -279,8 +280,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND git init && \ git remote add origin ' . $gitUrl . ' && \ git fetch origin && \ - git checkout main || git checkout -b main && \ - git pull origin main && \ + git checkout ' . $branch . ' || git checkout -b ' . $branch . ' && \ + git pull origin ' . $branch . ' && \ git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \ git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \ git pull origin ' . $gitBranch . ' && \