Skip to content

Commit 1092d00

Browse files
authored
Merge pull request coollabsio#2324 from coollabsio/next
v4.0.0-beta.292
2 parents cfadeb0 + cd58e0d commit 1092d00

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

app/Actions/Server/UpdateCoolify.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class UpdateCoolify
1414
public ?string $latestVersion = null;
1515
public ?string $currentVersion = null;
1616

17-
public function handle()
17+
public function handle($manual_update = false)
1818
{
1919
try {
2020
$settings = InstanceSettings::get();
@@ -26,17 +26,19 @@ public function handle()
2626
CleanupDocker::run($this->server, false);
2727
$this->latestVersion = get_latest_version_of_coolify();
2828
$this->currentVersion = config('version');
29-
if (!$settings->is_auto_update_enabled) {
30-
Log::info('Auto update is disabled');
31-
throw new \Exception('Auto update is disabled');
32-
}
33-
if ($this->latestVersion === $this->currentVersion) {
34-
Log::info('Already on latest version');
35-
throw new \Exception('Already on latest version');
36-
}
37-
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
38-
Log::info('Latest version is lower than current version?!');
39-
throw new \Exception('Latest version is lower than current version?!');
29+
if (!$manual_update) {
30+
if (!$settings->is_auto_update_enabled) {
31+
Log::debug('Auto update is disabled');
32+
return;
33+
}
34+
if ($this->latestVersion === $this->currentVersion) {
35+
Log::debug('Already on latest version');
36+
return;
37+
}
38+
if (version_compare($this->latestVersion, $this->currentVersion, '<')) {
39+
Log::debug('Latest version is lower than current version?!');
40+
return;
41+
}
4042
}
4143
Log::info("Updating from {$this->currentVersion} -> {$this->latestVersion}");
4244
$this->update();
@@ -52,7 +54,7 @@ private function update()
5254
{
5355
if (isDev()) {
5456
instant_remote_process([
55-
"sleep 10"
57+
"sleep 1"
5658
], $this->server);
5759
return;
5860
}

app/Livewire/Upgrade.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
use App\Actions\Server\UpdateCoolify;
66

77
use Livewire\Component;
8-
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
98

109
class Upgrade extends Component
1110
{
12-
use WithRateLimiting;
1311
public bool $showProgress = false;
1412
public bool $updateInProgress = false;
1513
public bool $isUpgradeAvailable = false;
@@ -31,9 +29,8 @@ public function upgrade()
3129
if ($this->updateInProgress) {
3230
return;
3331
}
34-
$this->rateLimit(1, 60);
3532
$this->updateInProgress = true;
36-
UpdateCoolify::run();
33+
UpdateCoolify::run(manual_update: true);
3734
} catch (\Throwable $e) {
3835
return handleError($e, $this);
3936
}

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.291',
10+
'release' => '4.0.0-beta.292',
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.291';
3+
return '4.0.0-beta.292';

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.291"
4+
"version": "4.0.0-beta.292"
55
},
66
"sentinel": {
77
"version": "0.0.4"

0 commit comments

Comments
 (0)