From c93b7aa4529225603d3405ebc9663bf5ea02fea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 17 Aug 2022 13:34:52 +0000 Subject: [PATCH 01/19] Fix event-triggered multi-execution --- app/workers/functions.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index 8c0716665a..b50893724f 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -74,18 +74,22 @@ class FunctionsV1 extends Worker Console::success('Iterating function: ' . $function->getAttribute('name')); - $this->execute( - project: $project, - function: $function, - dbForProject: $database, - trigger: 'event', - // Pass first, most verbose event pattern - event: $events[0], - eventData: $payload, - user: $user - ); + try { + $this->execute( + project: $project, + function: $function, + dbForProject: $database, + trigger: 'event', + // Pass first, most verbose event pattern + event: $events[0], + eventData: $payload, + user: $user + ); - Console::success('Triggered function: ' . $events[0]); + Console::success('Triggered function: ' . $events[0]); + } catch (\Throwable $th) { + Console::error("Failed to execute " . $function->getAttribute('id') . " with error: " . $th->getMessage()); + } } } From 7c2fa124147a1e53caae3699fe3fac23ca66680e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Wed, 17 Aug 2022 13:42:06 +0000 Subject: [PATCH 02/19] Fix getting function ID --- app/workers/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/workers/functions.php b/app/workers/functions.php index b50893724f..dbd8924468 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -88,7 +88,7 @@ class FunctionsV1 extends Worker Console::success('Triggered function: ' . $events[0]); } catch (\Throwable $th) { - Console::error("Failed to execute " . $function->getAttribute('id') . " with error: " . $th->getMessage()); + Console::error("Failed to execute " . $function->getId() . " with error: " . $th->getMessage()); } } } From b5f02bd6c864bf928c3478fdf7aea9a0c50cd41f Mon Sep 17 00:00:00 2001 From: yatharth Date: Sat, 25 Feb 2023 20:36:09 +0530 Subject: [PATCH 03/19] fix error description for duplicate user --- app/config/errors.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/errors.php b/app/config/errors.php index 266e017e93..ed33b54146 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -102,7 +102,7 @@ return [ ], Exception::USER_ALREADY_EXISTS => [ 'name' => Exception::USER_ALREADY_EXISTS, - 'description' => 'A user with the same email already exists in your project.', + 'description' => 'A user with the same id, email, or phone already exists in your project.', 'code' => 409, ], Exception::USER_BLOCKED => [ From f5c7568287f31c5262ef7019b1fdff4f0eb5702b Mon Sep 17 00:00:00 2001 From: Rinku Hasija Date: Sat, 25 Mar 2023 17:32:46 +0530 Subject: [PATCH 04/19] fix-models-attributeDatetime-object-example Signed-off-by: Rinku Hasija --- src/Appwrite/Utopia/Response/Model/AttributeDatetime.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php b/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php index 16692d215b..4651aebd06 100644 --- a/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php +++ b/src/Appwrite/Utopia/Response/Model/AttributeDatetime.php @@ -18,10 +18,10 @@ class AttributeDatetime extends Attribute 'example' => 'birthDay', ]) ->addRule('type', [ - 'type' => self::TYPE_DATETIME, + 'type' => self::TYPE_STRING, 'description' => 'Attribute type.', 'default' => '', - 'example' => self::TYPE_DATETIME_EXAMPLE, + 'example' => self::TYPE_DATETIME, ]) ->addRule('format', [ 'type' => self::TYPE_DATETIME, From f30d11ed60e6deaf438183d406a7e65441a7abe9 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 13 Apr 2023 01:23:49 +0400 Subject: [PATCH 05/19] feat: update cli version --- app/config/platforms.php | 38 +++++++++---------- app/console | 2 +- app/tasks/sdks.php | 4 +- composer.lock | 12 +++--- .../console-cli/examples/console/variables.md | 1 + 5 files changed, 29 insertions(+), 28 deletions(-) create mode 100644 docs/examples/1.3.x/console-cli/examples/console/variables.md diff --git a/app/config/platforms.php b/app/config/platforms.php index 0bbbf76aa2..832753b8eb 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -28,7 +28,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-web.git', 'gitRepoName' => 'sdk-for-web', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', 'demos' => [ [ 'icon' => 'react.svg', @@ -76,7 +76,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-flutter.git', 'gitRepoName' => 'sdk-for-flutter', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'apple', @@ -94,7 +94,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-apple.git', 'gitRepoName' => 'sdk-for-apple', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'objective-c', @@ -111,7 +111,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-objective-c.git', 'gitRepoName' => 'sdk-for-objective-c', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'android', @@ -129,7 +129,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-android.git', 'gitRepoName' => 'sdk-for-android', 'gitUserName' => 'appwrite', - 'gitBranch' => 'main', + 'gitBranch' => 'dev', 'docDirectories' => [ 'Kotlin' => 'kotlin', 'Java' => 'java', @@ -196,14 +196,14 @@ return [ 'prism' => 'javascript', 'source' => \realpath(__DIR__ . '/../sdks/console-web'), 'gitUrl' => 'git@github.com:appwrite/sdk-for-console.git', - 'gitBranch' => 'main', + 'gitBranch' => 'dev', 'gitRepoName' => 'sdk-for-console', 'gitUserName' => 'appwrite', ], [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '2.0.0', + 'version' => '2.0.1', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, @@ -216,7 +216,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-cli.git', 'gitRepoName' => 'sdk-for-cli', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], ], ], @@ -244,7 +244,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-node.git', 'gitRepoName' => 'sdk-for-node', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'deno', @@ -262,7 +262,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-deno.git', 'gitRepoName' => 'sdk-for-deno', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'php', @@ -280,7 +280,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-php.git', 'gitRepoName' => 'sdk-for-php', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'python', @@ -298,7 +298,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-python.git', 'gitRepoName' => 'sdk-for-python', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'ruby', @@ -316,7 +316,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-ruby.git', 'gitRepoName' => 'sdk-for-ruby', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'go', @@ -334,7 +334,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-go.git', 'gitRepoName' => 'sdk-for-go', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'java', @@ -352,7 +352,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-java.git', 'gitRepoName' => 'sdk-for-java', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'dotnet', @@ -370,7 +370,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-dotnet.git', 'gitRepoName' => 'sdk-for-dotnet', 'gitUserName' => 'appwrite', - 'gitBranch' => 'main', + 'gitBranch' => 'dev', ], [ 'key' => 'dart', @@ -388,7 +388,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-dart.git', 'gitRepoName' => 'sdk-for-dart', 'gitUserName' => 'appwrite', - 'gitBranch' => 'master', + 'gitBranch' => 'dev', ], [ 'key' => 'kotlin', @@ -406,7 +406,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-kotlin.git', 'gitRepoName' => 'sdk-for-kotlin', 'gitUserName' => 'appwrite', - 'gitBranch' => 'main', + 'gitBranch' => 'dev', 'docDirectories' => [ 'Kotlin' => 'kotlin', 'Java' => 'java', @@ -428,7 +428,7 @@ return [ 'gitUrl' => 'git@github.com:appwrite/sdk-for-swift.git', 'gitRepoName' => 'sdk-for-swift', 'gitUserName' => 'appwrite', - 'gitBranch' => 'main', + 'gitBranch' => 'dev', ], [ 'key' => 'graphql', diff --git a/app/console b/app/console index ac4181aea4..c643c77f30 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit ac4181aea403d888e63cb527c700e80013c68ea8 +Subproject commit c643c77f30d63db1c704d2c114e59d5c886db4dd diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index 4945fcfe9a..dadb08be3f 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -239,8 +239,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND cd ' . $target . ' && \ git init --initial-branch=' . $gitBranch . ' && \ git remote add origin ' . $gitUrl . ' && \ - git fetch && \ - git pull ' . $gitUrl . ' && \ + git fetch origin ' . $gitBranch . ' && \ + git pull origin ' . $gitBranch . ' && \ rm -rf ' . $target . '/* && \ cp -r ' . $result . '/* ' . $target . '/ && \ git add . && \ diff --git a/composer.lock b/composer.lock index 2d402ddb31..57c0a09235 100644 --- a/composer.lock +++ b/composer.lock @@ -3037,16 +3037,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "0.32.1", + "version": "0.32.2", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "ba1d7afd57e3baef06c04ce6abc26f79310146df" + "reference": "cdec289bcf38c99d0074414d2438e9967d0c9699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/ba1d7afd57e3baef06c04ce6abc26f79310146df", - "reference": "ba1d7afd57e3baef06c04ce6abc26f79310146df", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/cdec289bcf38c99d0074414d2438e9967d0c9699", + "reference": "cdec289bcf38c99d0074414d2438e9967d0c9699", "shasum": "" }, "require": { @@ -3082,9 +3082,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.32.1" + "source": "https://github.com/appwrite/sdk-generator/tree/0.32.2" }, - "time": "2023-04-12T04:43:07+00:00" + "time": "2023-04-12T21:06:57+00:00" }, { "name": "doctrine/deprecations", diff --git a/docs/examples/1.3.x/console-cli/examples/console/variables.md b/docs/examples/1.3.x/console-cli/examples/console/variables.md new file mode 100644 index 0000000000..1c67cf5ad8 --- /dev/null +++ b/docs/examples/1.3.x/console-cli/examples/console/variables.md @@ -0,0 +1 @@ +appwrite console variables From 5d4e0762bb37cf93b471f0bdc6b5be3038d74747 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 13 Apr 2023 01:33:25 +0400 Subject: [PATCH 06/19] feat: update cli version --- app/console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/console b/app/console index c643c77f30..ac4181aea4 160000 --- a/app/console +++ b/app/console @@ -1 +1 @@ -Subproject commit c643c77f30d63db1c704d2c114e59d5c886db4dd +Subproject commit ac4181aea403d888e63cb527c700e80013c68ea8 From 0fcfeb50a6ecab776a1d8128f94714c6501561f3 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 13 Apr 2023 01:48:44 +0400 Subject: [PATCH 07/19] feat: update cli version --- app/config/platforms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 832753b8eb..caff21b28b 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -203,7 +203,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '2.0.1', + 'version' => '2.0.2', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, From 166b446fe74114bd32398d875aaea7aa283afe8a Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Fri, 14 Apr 2023 14:31:22 -0400 Subject: [PATCH 08/19] Update description for _APP_FUNCTIONS_INACTIVE_THRESHOLD --- app/config/variables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/variables.php b/app/config/variables.php index 193e167b8f..850fbe1194 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -764,7 +764,7 @@ return [ ], [ 'name' => '_APP_FUNCTIONS_INACTIVE_THRESHOLD', - 'description' => 'The minimum time a function can be inactive before it\'s container is shutdown and put to sleep. The default value is 60 seconds', + 'description' => 'The minimum time a function has been inactive before it could be shut down and put to sleep. Containers are checked once every hour, and if they have been inactive for an interval longer than this threshold, they are put to sleep to free server resources. This feature intends to prevent the buildup of unused containers. Containers may remain active for longer than the interval before being put to sleep. If no value is provided, defaults to 60 seconds.', 'introduction' => '0.13.0', 'default' => '60', 'required' => false, From b6c43e2ccfc5a3d51396269a1cafc4e720632c29 Mon Sep 17 00:00:00 2001 From: "Vincent (Wen Yu) Ge" Date: Mon, 17 Apr 2023 14:02:11 -0400 Subject: [PATCH 09/19] Update app/config/variables.php --- app/config/variables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/variables.php b/app/config/variables.php index 850fbe1194..978a853ef6 100644 --- a/app/config/variables.php +++ b/app/config/variables.php @@ -764,7 +764,7 @@ return [ ], [ 'name' => '_APP_FUNCTIONS_INACTIVE_THRESHOLD', - 'description' => 'The minimum time a function has been inactive before it could be shut down and put to sleep. Containers are checked once every hour, and if they have been inactive for an interval longer than this threshold, they are put to sleep to free server resources. This feature intends to prevent the buildup of unused containers. Containers may remain active for longer than the interval before being put to sleep. If no value is provided, defaults to 60 seconds.', + 'description' => 'The minimum time a function must be inactive before it can be shut down and cleaned up. This feature is intended to clean up unused containers. Containers may remain active for longer than the interval before being shut down, as Appwrite only cleans up unused containers every hour. If no value is provided, the default is 60 seconds.', 'introduction' => '0.13.0', 'default' => '60', 'required' => false, From b3c2273780fc8bad251d3e6cf83ed6c112913b1f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 13:22:13 +0200 Subject: [PATCH 10/19] ci: release action --- .github/workflows/release.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..1ae362587d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: "Tests" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: [pull_request] +jobs: + tests: + name: Unit & E2E + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + # Fetch submodules + submodules: recursive + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # This is a separate action that sets up buildx runner + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + build-args: [ 'VERSION=1.XX.X' ] + push: false + tags: + - appwrite/appwrite:latest + - appwrite/appwrite:1.XX.X + - appwrite/appwrite:1.XX + - appwrite/appwrite:1 From 85b8728e7147520b0ce092f7eef569d684767cdb Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 13:23:14 +0200 Subject: [PATCH 11/19] fix: change name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ae362587d..0728deaf84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: "Tests" +name: "Release" concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 08e5dc1c400dd8be6e32775bc2e30879a3002d1f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 13:25:12 +0200 Subject: [PATCH 12/19] Update release.yml --- .github/workflows/release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0728deaf84..0cdff0ab08 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,10 +40,11 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - build-args: [ 'VERSION=1.XX.X' ] + build-args: | + VERSION=1.XX.X push: false - tags: - - appwrite/appwrite:latest - - appwrite/appwrite:1.XX.X - - appwrite/appwrite:1.XX - - appwrite/appwrite:1 + images: | + appwrite/appwrite:latest + appwrite/appwrite:1.XX.X + appwrite/appwrite:1.XX + appwrite/appwrite:1 From a769a18ba02b58fc4ca18f397d3dee2a4282be14 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 13:54:48 +0200 Subject: [PATCH 13/19] update tags --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0cdff0ab08..1a52e53ed3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,8 +43,4 @@ jobs: build-args: | VERSION=1.XX.X push: false - images: | - appwrite/appwrite:latest - appwrite/appwrite:1.XX.X - appwrite/appwrite:1.XX - appwrite/appwrite:1 + tags: appwrite/appwrite:latest,appwrite/appwrite:1.XX.X,appwrite/appwrite:1.XX,appwrite/appwrite:1 From 590ae9cfe40f7561e8a152a7f583218b21f8d8c3 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 13:55:05 +0200 Subject: [PATCH 14/19] update tags --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a52e53ed3..2608717159 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,4 +43,8 @@ jobs: build-args: | VERSION=1.XX.X push: false - tags: appwrite/appwrite:latest,appwrite/appwrite:1.XX.X,appwrite/appwrite:1.XX,appwrite/appwrite:1 + tags: | + appwrite/appwrite:latest + appwrite/appwrite:1.XX.X + appwrite/appwrite:1.XX + appwrite/appwrite:1 From 7d119aa68c290a087c3d048bb41b7bf19679d231 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 19 Apr 2023 14:03:23 +0200 Subject: [PATCH 15/19] ci: try sharing console build for all --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4ea62fd0d7..1a55209208 100755 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \ --no-plugins --no-scripts --prefer-dist \ `if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi` -FROM node:16.14.2-alpine3.15 as node +FROM --platform=$BUILDPLATFORM node:16.14.2-alpine3.15 as node COPY app/console /usr/local/src/console From ba1e5a71596a0dec19c7b211a98f530994a90702 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 20 Apr 2023 21:46:29 +0200 Subject: [PATCH 16/19] ci: use proper versions --- .github/workflows/release.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2608717159..fdd205d301 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ name: "Release" -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +on: + release: + types: [published] -on: [pull_request] jobs: tests: name: Unit & E2E @@ -35,16 +34,23 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: appwrite/appwrite + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}} + type=semver,pattern={{major}}.{{minor}} + - name: Build and push uses: docker/build-push-action@v4 with: context: . platforms: linux/amd64,linux/arm64 build-args: | - VERSION=1.XX.X + VERSION=${{ steps.meta.outputs.version }} push: false - tags: | - appwrite/appwrite:latest - appwrite/appwrite:1.XX.X - appwrite/appwrite:1.XX - appwrite/appwrite:1 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 725ebfcd44aa1bf0e708bd78e6f1181435c01860 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 20 Apr 2023 22:15:29 +0200 Subject: [PATCH 17/19] fix: ci version numbers --- .github/workflows/release.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fdd205d301..9116d7c32c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,11 +19,6 @@ jobs: # Fetch submodules submodules: recursive - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - # This is a separate action that sets up buildx runner - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -34,6 +29,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 @@ -51,6 +52,6 @@ jobs: platforms: linux/amd64,linux/arm64 build-args: | VERSION=${{ steps.meta.outputs.version }} - push: false + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 097030c348e2d0af909a9d858860830bedf629cb Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 21 Apr 2023 11:58:59 +0200 Subject: [PATCH 18/19] fix:: adapt to review --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9116d7c32c..6f8ea5fa93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,10 +19,6 @@ jobs: # Fetch submodules submodules: recursive - # This is a separate action that sets up buildx runner - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -41,9 +37,9 @@ jobs: with: images: appwrite/appwrite tags: | - type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}}.{{minor}}.{{patch}} - name: Build and push uses: docker/build-push-action@v4 From 2d0cf85edd83f702422f87066852eda6d66f474a Mon Sep 17 00:00:00 2001 From: Steven <1477010+stnguyen90@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:03:41 -0700 Subject: [PATCH 19/19] Fix typo in Apple Getting Started --- docs/sdks/apple/GETTING_STARTED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/apple/GETTING_STARTED.md b/docs/sdks/apple/GETTING_STARTED.md index 1da041112c..e62f1ce3fa 100644 --- a/docs/sdks/apple/GETTING_STARTED.md +++ b/docs/sdks/apple/GETTING_STARTED.md @@ -33,7 +33,7 @@ Next we need to add a hook to save cookies when our app is opened by its callbac > If you're using UIKit, you can skip this section. -In SwiftUI this is as simple as ensuring `.registerOAuthHanlder()` is called on the `View` you want to invoke an OAuth request from. +In SwiftUI this is as simple as ensuring `.registerOAuthHandler()` is called on the `View` you want to invoke an OAuth request from. ### Updating the SceneDelegate for UIKit