Refactor Upgrade.php and add isDev condition for upgrade availability

This commit is contained in:
Andras Bacsai 2024-05-17 10:12:17 +02:00
parent 7a618ef89c
commit e9d2dbcc92

View File

@ -3,6 +3,7 @@
namespace App\Livewire;
use App\Actions\Server\UpdateCoolify;
use Livewire\Component;
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
@ -19,9 +20,9 @@ public function checkUpdate()
$this->latestVersion = get_latest_version_of_coolify();
$currentVersion = config('version');
version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
// if (isDev()) {
if (isDev()) {
$this->isUpgradeAvailable = true;
// }
}
}
public function upgrade()