fix: не объявлять обновление если AppImage ещё не загружен в релиз
All checks were successful
Release / release (push) Successful in 1m45s
All checks were successful
Release / release (push) Successful in 1m45s
checkForUpdates теперь проверяет наличие .AppImage ассета перед тем как отправить update:available — исключает race condition между созданием тега CI и завершением загрузки артефакта. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
074bb73f3a
commit
3633850d8e
1 changed files with 6 additions and 0 deletions
|
|
@ -149,6 +149,12 @@ export class UpdaterService {
|
|||
const currentVersion = app.getVersion()
|
||||
|
||||
if (compareSemver(release.tag_name, currentVersion) > 0) {
|
||||
const asset = release.assets.find((a) => a.name.endsWith('.AppImage'))
|
||||
if (!asset) {
|
||||
// Релиз создан, но AppImage ещё не загружен CI
|
||||
this.send('update:not-available', {})
|
||||
return { hasUpdate: false }
|
||||
}
|
||||
const version = release.tag_name.replace(/^v/, '')
|
||||
const notes = release.body ?? ''
|
||||
this.send('update:available', { version, notes })
|
||||
|
|
|
|||
Loading…
Reference in a new issue