Skip to content

Commit 0590456

Browse files
authored
Merge pull request coollabsio#3029 from coollabsio/next
v4.0.0-beta.322
2 parents f089185 + e2726d9 commit 0590456

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

app/Actions/Server/UpdateCoolify.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use App\Models\InstanceSettings;
66
use App\Models\Server;
7+
use Illuminate\Support\Facades\File;
8+
use Illuminate\Support\Facades\Http;
79
use Lorisleiva\Actions\Concerns\AsAction;
810

911
class UpdateCoolify
@@ -25,6 +27,11 @@ public function handle($manual_update = false)
2527
return;
2628
}
2729
CleanupDocker::dispatch($this->server, false)->onQueue('high');
30+
$response = Http::retry(3, 1000)->get('https://cdn.coollabs.io/coolify/versions.json');
31+
if ($response->successful()) {
32+
$versions = $response->json();
33+
File::put(base_path('versions.json'), json_encode($versions, JSON_PRETTY_PRINT));
34+
}
2835
$this->latestVersion = get_latest_version_of_coolify();
2936
$this->currentVersion = config('version');
3037
if (! $manual_update) {
@@ -39,6 +46,8 @@ public function handle($manual_update = false)
3946
}
4047
}
4148
$this->update();
49+
$settings->new_version_available = false;
50+
$settings->save();
4251
} catch (\Throwable $e) {
4352
throw $e;
4453
}

app/Models/Server.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,8 +715,8 @@ public function getContainers()
715715
}
716716

717717
return [
718-
'containers' => $containers ?? collect([]),
719-
'containerReplicates' => $containerReplicates ?? collect([]),
718+
'containers' => collect($containers) ?? collect([]),
719+
'containerReplicates' => collect($containerReplicates) ?? collect([]),
720720
];
721721
}
722722

bootstrap/helpers/proxy.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use App\Actions\Proxy\SaveConfiguration;
4+
use App\Enums\ProxyTypes;
45
use App\Models\Application;
56
use App\Models\Server;
67
use Symfony\Component\Yaml\Yaml;

config/sentry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// The release version of your application
99
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
10-
'release' => '4.0.0-beta.321',
10+
'release' => '4.0.0-beta.322',
1111
// When left empty or `null` the Laravel environment will be used
1212
'environment' => config('app.env'),
1313

config/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
return '4.0.0-beta.321';
3+
return '4.0.0-beta.322';

versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"coolify": {
33
"v4": {
4-
"version": "4.0.0-beta.321"
4+
"version": "4.0.0-beta.322"
55
}
66
}
77
}

0 commit comments

Comments
 (0)