Refactor Upgrade.php and add isDev condition for upgrade availability
This commit is contained in:
parent
7a618ef89c
commit
e9d2dbcc92
@ -3,6 +3,7 @@
|
|||||||
namespace App\Livewire;
|
namespace App\Livewire;
|
||||||
|
|
||||||
use App\Actions\Server\UpdateCoolify;
|
use App\Actions\Server\UpdateCoolify;
|
||||||
|
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
|
use DanHarrin\LivewireRateLimiting\WithRateLimiting;
|
||||||
|
|
||||||
@ -19,9 +20,9 @@ public function checkUpdate()
|
|||||||
$this->latestVersion = get_latest_version_of_coolify();
|
$this->latestVersion = get_latest_version_of_coolify();
|
||||||
$currentVersion = config('version');
|
$currentVersion = config('version');
|
||||||
version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
|
version_compare($currentVersion, $this->latestVersion, '<') ? $this->isUpgradeAvailable = true : $this->isUpgradeAvailable = false;
|
||||||
// if (isDev()) {
|
if (isDev()) {
|
||||||
$this->isUpgradeAvailable = true;
|
$this->isUpgradeAvailable = true;
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function upgrade()
|
public function upgrade()
|
||||||
|
Loading…
Reference in New Issue
Block a user