From 706fd91974acaab2fa65b3ff800871b08e140eff Mon Sep 17 00:00:00 2001 From: Lonny Kapelushnik Date: Sun, 30 Jul 2023 21:52:51 -0600 Subject: [PATCH 1/3] Update S3Provider.php Update S3 to implement correct `Updater` interface I wasn't sure if the env vars were added to the binary so I migrated from using AWS keys / secret to a profile --- src/Updater/S3Provider.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Updater/S3Provider.php b/src/Updater/S3Provider.php index 1a013e77..e7684a86 100644 --- a/src/Updater/S3Provider.php +++ b/src/Updater/S3Provider.php @@ -10,8 +10,22 @@ public function __construct(protected array $config) { } - public function providedEnvironmentVariables(): array + public function environmentVariables(): array { - return []; + return [ + 'AWS_PROFILE' => $this->config['profile'], + ]; + } + + public function builderOptions(): array + { + return [ + 'provider' => 's3', + 'endpoint' => $this->config['endpoint'], + 'region' => $this->config['region'], + 'bucket' => $this->config['bucket'], + 'path' => $this->config['path'], + 'acl' => $this->config['acl'] + ]; } } From db3d28c30b335e9d3503b8b545ff550d39fc000e Mon Sep 17 00:00:00 2001 From: Lonny Kapelushnik Date: Mon, 29 Apr 2024 08:04:09 -0600 Subject: [PATCH 2/3] Update src/Updater/S3Provider.php Co-authored-by: Simon Hamp --- src/Updater/S3Provider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Updater/S3Provider.php b/src/Updater/S3Provider.php index e7684a86..f673fbca 100644 --- a/src/Updater/S3Provider.php +++ b/src/Updater/S3Provider.php @@ -13,7 +13,8 @@ public function __construct(protected array $config) public function environmentVariables(): array { return [ - 'AWS_PROFILE' => $this->config['profile'], + 'AWS_ACCESS_KEY_ID' => $this->config['key'], + 'AWS_SECRET_ACCESS_KEY' => $this->config['secret'], ]; } From 8a088d497dbabc7bb769a1b4c120e36c7f49be9e Mon Sep 17 00:00:00 2001 From: Lonny Kapelushnik Date: Mon, 29 Apr 2024 08:04:14 -0600 Subject: [PATCH 3/3] Update src/Updater/S3Provider.php Co-authored-by: Simon Hamp --- src/Updater/S3Provider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Updater/S3Provider.php b/src/Updater/S3Provider.php index f673fbca..346abdc1 100644 --- a/src/Updater/S3Provider.php +++ b/src/Updater/S3Provider.php @@ -26,7 +26,6 @@ public function builderOptions(): array 'region' => $this->config['region'], 'bucket' => $this->config['bucket'], 'path' => $this->config['path'], - 'acl' => $this->config['acl'] ]; } }