This commit is contained in:
crazywhalecc 2026-02-28 15:16:31 +08:00
parent 029f8efa12
commit 4f2ca17bde
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -356,14 +356,14 @@ class ArtifactDownloader
$downloader = new $cls(); $downloader = new $cls();
return $downloader->checkUpdate($artifact_name, $info['config'], $info['version'], $this); return $downloader->checkUpdate($artifact_name, $info['config'], $info['version'], $this);
} }
// custom source: delegate to registered check-update callback
if (($info['lock_type'] ?? null) === 'source' && ($callback = $artifact->getCustomSourceCheckUpdateCallback()) !== null) { if (($info['lock_type'] ?? null) === 'source' && ($callback = $artifact->getCustomSourceCheckUpdateCallback()) !== null) {
return ApplicationContext::invoke($callback, [ return ApplicationContext::invoke($callback, [
ArtifactDownloader::class => $this, ArtifactDownloader::class => $this,
'old_version' => $info['version'], 'old_version' => $info['version'],
]); ]);
} }
// custom binary: delegate to registered check-update callback
if (($callback = $artifact->getCustomBinaryCheckUpdateCallback()) !== null) { if (($callback = $artifact->getCustomBinaryCheckUpdateCallback()) !== null) {
return ApplicationContext::invoke($callback, [ return ApplicationContext::invoke($callback, [
ArtifactDownloader::class => $this, ArtifactDownloader::class => $this,