fix: не объявлять обновление если AppImage ещё не загружен в релиз
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:
vodyanoysh 2026-04-30 08:07:59 +07:00
parent 074bb73f3a
commit 3633850d8e

View file

@ -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 })