From 5e0ef61c254aea7f75c3946d31d999df7ba70fbc Mon Sep 17 00:00:00 2001 From: vodyanoysh Date: Wed, 29 Apr 2026 23:23:28 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B1=D0=B5=D0=BB=20=D0=B8=D0=B7=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B8=20AppImage=20+=20=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=20update-check=20=D0=B2=20dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit electron-builder.yml: artifactName = aero-mail-\${version}.AppImage — имя файла без пробелов, URL-энкодирование больше не нужно CI: ищем dist/aero-mail-*.AppImage, убран python3 URL-encode updater.ts: checkForUpdates() возвращает not-available когда !app.isPackaged — dev/local-сборки не предлагают обновиться Co-Authored-By: Claude Sonnet 4.6 --- .forgejo/workflows/release.yml | 11 ++++------- electron-builder.yml | 1 + src/main/services/updater.ts | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index ee4c0ed..8b3ebe0 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -51,12 +51,9 @@ jobs: - name: Find built AppImage id: artifact run: | - APPIMAGE=$(ls dist/*.AppImage | head -1) - NAME=$(basename "$APPIMAGE") - NAME_ENC=$(python3 -c "import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))" "$NAME") - echo "path=$APPIMAGE" >> "$GITHUB_OUTPUT" - echo "name=$NAME" >> "$GITHUB_OUTPUT" - echo "name_enc=$NAME_ENC" >> "$GITHUB_OUTPUT" + APPIMAGE=$(ls dist/aero-mail-*.AppImage | head -1) + echo "path=$APPIMAGE" >> "$GITHUB_OUTPUT" + echo "name=$(basename $APPIMAGE)" >> "$GITHUB_OUTPUT" - name: Create Forgejo release id: release @@ -77,7 +74,7 @@ jobs: TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_ID: ${{ steps.release.outputs.id }} ASSET_PATH: ${{ steps.artifact.outputs.path }} - ASSET_NAME: ${{ steps.artifact.outputs.name_enc }} + ASSET_NAME: ${{ steps.artifact.outputs.name }} run: | curl -sf -X POST \ -H "Authorization: token ${TOKEN}" \ diff --git a/electron-builder.yml b/electron-builder.yml index ed2ec7d..93bffb8 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -11,6 +11,7 @@ publish: linux: target: - AppImage + artifactName: aero-mail-${version}.AppImage category: Network icon: resources/icon.png win: diff --git a/src/main/services/updater.ts b/src/main/services/updater.ts index 9be8100..011d080 100644 --- a/src/main/services/updater.ts +++ b/src/main/services/updater.ts @@ -97,6 +97,10 @@ export class UpdaterService { } async checkForUpdates(): Promise<{ hasUpdate: boolean; version?: string; notes?: string }> { + if (!app.isPackaged) { + this.send('update:not-available', {}) + return { hasUpdate: false } + } try { const release = await fetchJson(REPO_API) const currentVersion = app.getVersion()