diff --git a/composer.json b/composer.json index 4ce175abea..e76948287e 100644 --- a/composer.json +++ b/composer.json @@ -86,7 +86,7 @@ ], "require-dev": { "ext-fileinfo": "*", - "appwrite/sdk-generator": "0.35.*", + "appwrite/sdk-generator": "dev-feat-whitelist-enums as 0.35.2", "phpunit/phpunit": "9.5.20", "squizlabs/php_codesniffer": "^3.7", "swoole/ide-helper": "5.0.2", diff --git a/composer.lock b/composer.lock index e8334179ff..7161efe714 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9afc62ce9c6ba587b9c028e11494e026", + "content-hash": "31937ddcd75e14c0af8d387941678509", "packages": [ { "name": "adhocore/jwt", @@ -3136,16 +3136,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.35.2", + "version": "dev-feat-whitelist-enums", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "2dfe0430a64ffd2a07078d83b20144b871acac3b" + "reference": "c921cbbcfb5ef16305c6455fe5ca27fdab75c00a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/2dfe0430a64ffd2a07078d83b20144b871acac3b", - "reference": "2dfe0430a64ffd2a07078d83b20144b871acac3b", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/c921cbbcfb5ef16305c6455fe5ca27fdab75c00a", + "reference": "c921cbbcfb5ef16305c6455fe5ca27fdab75c00a", "shasum": "" }, "require": { @@ -3181,9 +3181,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.35.2" + "source": "https://github.com/appwrite/sdk-generator/tree/feat-whitelist-enums" }, - "time": "2023-09-14T14:59:50+00:00" + "time": "2023-11-01T04:40:27+00:00" }, { "name": "doctrine/deprecations", @@ -5796,9 +5796,18 @@ "time": "2023-08-28T11:09:02+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "appwrite/sdk-generator", + "version": "dev-feat-whitelist-enums", + "alias": "0.35.2", + "alias_normalized": "0.35.2.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "appwrite/sdk-generator": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -5822,5 +5831,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index a052acf373..2122a1cb9c 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -252,19 +252,20 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND } if ($git && !empty($gitUrl)) { - \exec('rm -rf ' . $target . ' && \ - mkdir -p ' . $target . ' && \ - cd ' . $target . ' && \ - git init --initial-branch=' . $gitBranch . ' && \ - git remote add origin ' . $gitUrl . ' && \ - git fetch origin ' . $gitBranch . ' && \ - git pull origin ' . $gitBranch . ' && \ - rm -rf ' . $target . '/* && \ - cp -r ' . $result . '/* ' . $target . '/ && \ - git add . && \ - git commit -m "' . $message . '" && \ - git push -u origin ' . $gitBranch . ' - '); + \exec(" + rm -rf $target + mkdir -p $target + cd $target + git init --initial-branch=$gitBranch + git remote add origin $gitUrl + git fetch origin $gitBranch + git pull origin $gitBranch + rm -rf $target/* + cp -r $result/* $target/ + git add . + git commit -m \"$message\" + git push -u origin $gitBranch + "); Console::success("Pushed {$language['name']} SDK to {$gitUrl}");