π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[ensu] fix updater artifact generation in release workflow
Prateek Sunal63ebc3c9e6be
diff --git a/.github/workflows/ensu-release.yml b/.github/workflows/ensu-release.ymlindex 8b578f9077..258dc53635 100644--- a/.github/workflows/ensu-release.yml+++ b/.github/workflows/ensu-release.yml@@ -33,7 +33,6 @@ jobs:runs-on: ${{ matrix.platform.os }}env:HAS_WINDOWS_SIGNING: ${{ secrets.AZURE_TENANT_ID != '' && secrets.AZURE_CLIENT_ID != '' && secrets.AZURE_CLIENT_SECRET != '' && secrets.AZURE_ENDPOINT != '' && secrets.AZURE_CODE_SIGNING_NAME != '' && secrets.AZURE_CERT_PROFILE_NAME != '' }}- HAS_UPDATER_CONFIG: ${{ vars.ENSU_TAURI_UPDATER_PUBKEY != '' }}steps:- name: Set release tag@@ -118,7 +117,6 @@ jobs:run: node rust/apps/ensu/scripts/ci-enable-windows-signing.mjs- name: Enable updater artifacts for release builds- if: env.HAS_UPDATER_CONFIG == 'true'shell: bashenv:ENSU_TAURI_UPDATER_PUBKEY: ${{ vars.ENSU_TAURI_UPDATER_PUBKEY }}@@ -160,10 +158,9 @@ jobs:releaseBody: "Ensu release assets: Linux/macOS/Windows desktop + Android APK."releaseDraft: trueprerelease: false- # Keep release assets only on the draft GitHub release (no duplicate Actions artifacts).- uploadWorkflowArtifacts: false- uploadUpdaterJson: false- uploadUpdaterSignatures: true+ includeDebug: false+ includeRelease: true+ includeUpdaterJson: falseargs: ${{ matrix.platform.rust-target != 'x86_64-unknown-linux-gnu' && format('--target {0}', matrix.platform.rust-target) || '' }}diff --git a/rust/apps/ensu/scripts/ci-enable-updater.mjs b/rust/apps/ensu/scripts/ci-enable-updater.mjsindex 2de29bb2d6..508336f359 100644--- a/rust/apps/ensu/scripts/ci-enable-updater.mjs+++ b/rust/apps/ensu/scripts/ci-enable-updater.mjs@@ -4,24 +4,27 @@ const configPath =process.env.ENSU_TAURI_CONFIG_PATH ??"rust/apps/ensu/src-tauri/tauri.conf.json";-const pubkey = process.env.ENSU_TAURI_UPDATER_PUBKEY;+const pubkey = process.env.ENSU_TAURI_UPDATER_PUBKEY?.trim();const endpoint = (process.env.ENSU_TAURI_UPDATER_ENDPOINT ||"https://ente.io/release-info/ensu-desktop.json").trim();-if (!pubkey) {- throw new Error("ENSU_TAURI_UPDATER_PUBKEY is required");-}-const config = JSON.parse(fs.readFileSync(configPath, "utf8"));config.bundle = config.bundle || {};config.bundle.createUpdaterArtifacts = true;-config.plugins = config.plugins || {};-config.plugins.updater = {- pubkey,- endpoints: [endpoint],-};++if (pubkey) {+ config.plugins = config.plugins || {};+ config.plugins.updater = {+ pubkey,+ endpoints: [endpoint],+ };+ console.log(`Enabled updater artifacts + updater plugin config in ${configPath}`);+} else {+ console.log(+ `Enabled updater artifacts in ${configPath} (ENSU_TAURI_UPDATER_PUBKEY not set, leaving updater plugin config unchanged)`,+ );+}fs.writeFileSync(configPath, JSON.stringify(config, null, 2));-console.log(`Enabled updater in ${configPath}`);