From c637d2d90d277e8a9bcf211923681e2b15fd6965 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 28 Sep 2023 22:31:53 +0200 Subject: [PATCH 1/4] version++ --- app/Console/Commands/SyncBunny.php | 1 - config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php index a64da5a35..40bb96a83 100644 --- a/app/Console/Commands/SyncBunny.php +++ b/app/Console/Commands/SyncBunny.php @@ -56,7 +56,6 @@ class SyncBunny extends Command ]; $fileStream = fopen($file, "r"); $file = fread($fileStream, filesize($file)); - $that->info('Uploading: ' . $file); return PendingRequest::baseUrl('https://storage.bunnycdn.com')->withHeaders($headers)->withBody($file)->throw(); }); PendingRequest::macro('purge', function ($url) use ($that) { diff --git a/config/sentry.php b/config/sentry.php index 16e57890d..23e63e569 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.47', + 'release' => '4.0.0-beta.next', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 67a77dc1f..212099521 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Thu, 28 Sep 2023 22:42:10 +0200 Subject: [PATCH 2/4] fix: sync:bunny --- app/Console/Commands/SyncBunny.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/SyncBunny.php b/app/Console/Commands/SyncBunny.php index 40bb96a83..6a85ffd91 100644 --- a/app/Console/Commands/SyncBunny.php +++ b/app/Console/Commands/SyncBunny.php @@ -48,14 +48,15 @@ class SyncBunny extends Command $versions = "versions.json"; - PendingRequest::macro('storage', function ($file) use($that) { + PendingRequest::macro('storage', function ($fileName) use($that) { $headers = [ 'AccessKey' => env('BUNNY_STORAGE_API_KEY'), 'Accept' => 'application/json', 'Content-Type' => 'application/octet-stream' ]; - $fileStream = fopen($file, "r"); - $file = fread($fileStream, filesize($file)); + $fileStream = fopen($fileName, "r"); + $file = fread($fileStream, filesize($fileName)); + $that->info('Uploading: ' . $fileName); return PendingRequest::baseUrl('https://storage.bunnycdn.com')->withHeaders($headers)->withBody($file)->throw(); }); PendingRequest::macro('purge', function ($url) use ($that) { @@ -76,7 +77,7 @@ class SyncBunny extends Command } if ($only_template) { Http::pool(fn (Pool $pool) => [ - $pool->storage(file: "$parent_dir/templates/$service_template")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$service_template"), + $pool->storage(fileName: "$parent_dir/templates/$service_template")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$service_template"), $pool->purge("$bunny_cdn/$bunny_cdn_path/$service_template"), ]); $this->info('Service template uploaded & purged...'); From 7d45bb1335bfdce32230b131cb97c389cae215ba Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 28 Sep 2023 22:55:03 +0200 Subject: [PATCH 3/4] version check --- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index 23e63e569..bdac491ae 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.next', + 'release' => '4.0.0-beta.48', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 212099521..b4742d477 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ Date: Fri, 29 Sep 2023 09:48:20 +0200 Subject: [PATCH 4/4] fix: update process if server has been renamed --- app/Actions/Server/UpdateCoolify.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Actions/Server/UpdateCoolify.php b/app/Actions/Server/UpdateCoolify.php index bdf8275c7..3203f9b05 100644 --- a/app/Actions/Server/UpdateCoolify.php +++ b/app/Actions/Server/UpdateCoolify.php @@ -16,8 +16,7 @@ class UpdateCoolify try { $settings = InstanceSettings::get(); ray('Running InstanceAutoUpdateJob'); - $localhost_name = 'localhost'; - $this->server = Server::where('name', $localhost_name)->first(); + $this->server = Server::find(0)->first(); if (!$this->server) { return; }