From e834f4a108e03ebf2a5be3f72278a948f0021708 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 18 May 2023 19:49:45 +0100 Subject: [PATCH] Fix accidental change of nightly deb name (#977) * Fix accidental change of nightly deb name * Remove stale deb-custom-control arg --- .github/workflows/build_linux.yaml | 3 +-- scripts/generate-builder-config.ts | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_linux.yaml b/.github/workflows/build_linux.yaml index 0c72bdd..9e59ba8 100644 --- a/.github/workflows/build_linux.yaml +++ b/.github/workflows/build_linux.yaml @@ -122,8 +122,7 @@ jobs: run: | npx ts-node scripts/generate-builder-config.ts \ ${{ steps.nightly.outputs.config-args }} \ - ${{ steps.debian.outputs.config-args }} \ - --deb-custom-control=debcontrol + ${{ steps.debian.outputs.config-args }} yarn build --publish never -l --config electron-builder.json ${{ steps.config.outputs.build-args }} - name: Check native libraries diff --git a/scripts/generate-builder-config.ts b/scripts/generate-builder-config.ts index 36da6a6..718edca 100755 --- a/scripts/generate-builder-config.ts +++ b/scripts/generate-builder-config.ts @@ -25,6 +25,7 @@ const ELECTRON_BUILDER_CFG_FILE = "electron-builder.json"; const NIGHTLY_APP_ID = "im.riot.nightly"; const NIGHTLY_APP_NAME = "element-desktop-nightly"; +const NIGHTLY_DEB_NAME = "element-nightly"; const argv = parseArgs<{ "nightly"?: string; @@ -65,11 +66,14 @@ async function main(): Promise { }, }; + if (!cfg.deb!.fpm) cfg.deb!.fpm = []; + if (argv.nightly) { cfg.appId = NIGHTLY_APP_ID; cfg.extraMetadata!.productName += " Nightly"; cfg.extraMetadata!.name = NIGHTLY_APP_NAME; cfg.extraMetadata!.description += " (nightly unstable build)"; + cfg.deb!.fpm!.push("--name", NIGHTLY_DEB_NAME); let version = argv.nightly; if (os.platform() === "win32") { @@ -82,7 +86,6 @@ async function main(): Promise { } cfg.extraMetadata!.version = version; } else { - if (!cfg.deb!.fpm) cfg.deb!.fpm = []; cfg.deb!.fpm!.push("--deb-field", "Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)"); cfg.deb!.fpm!.push("--deb-field", "Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)"); } @@ -104,7 +107,6 @@ async function main(): Promise { cfg.extraMetadata!.productName = cfg.extraMetadata!.productName!.replace(/ /g, "-"); if (argv["deb-changelog"]) { - if (!cfg.deb!.fpm) cfg.deb!.fpm = []; cfg.deb!.fpm!.push(`--deb-changelog=${argv["deb-changelog"]}`); }