mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-28 02:06:37 -04:00
fix(helper): prefer newer fetched helper version
Use a CDN-fetched helper version when it is newer than the bundled version, while ignoring stale stored versions.
This commit is contained in:
@@ -4234,6 +4234,8 @@ function coolifyHelperImage(): string
|
||||
|
||||
function getHelperVersion(): string
|
||||
{
|
||||
$configuredHelperVersion = config('constants.coolify.helper_version');
|
||||
|
||||
if (isDev()) {
|
||||
$devHelperVersion = InstanceSettings::query()->whereKey(0)->value('dev_helper_version');
|
||||
|
||||
@@ -4242,7 +4244,13 @@ function getHelperVersion(): string
|
||||
}
|
||||
}
|
||||
|
||||
return config('constants.coolify.helper_version');
|
||||
$fetchedHelperVersion = InstanceSettings::query()->whereKey(0)->value('helper_version');
|
||||
|
||||
if (! empty($fetchedHelperVersion) && version_compare($fetchedHelperVersion, $configuredHelperVersion, '>')) {
|
||||
return $fetchedHelperVersion;
|
||||
}
|
||||
|
||||
return $configuredHelperVersion;
|
||||
}
|
||||
|
||||
function loggy($message = null, array $context = [])
|
||||
|
||||
Reference in New Issue
Block a user