From cd89fed834bc5002e60deab2fcd8564149ca3daa Mon Sep 17 00:00:00 2001 From: David Baker Date: Sat, 7 Mar 2020 12:23:00 +0000 Subject: [PATCH 1/3] Move deb control stuff into builder We need to change it between release & nightly and it's probably not much use for anyone else, and gets rid of the confusing errors about the 'control' file not existing. --- {pkg => riot.im/release}/control.template | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {pkg => riot.im/release}/control.template (100%) diff --git a/pkg/control.template b/riot.im/release/control.template similarity index 100% rename from pkg/control.template rename to riot.im/release/control.template From 3f89d545ed276eaaf5332b4e15fff6125a490838 Mon Sep 17 00:00:00 2001 From: David Baker Date: Sat, 7 Mar 2020 14:19:04 +0000 Subject: [PATCH 2/3] Template control file for nightly --- riot.im/nightly/control.template | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 riot.im/nightly/control.template diff --git a/riot.im/nightly/control.template b/riot.im/nightly/control.template new file mode 100644 index 0000000..6528a6b --- /dev/null +++ b/riot.im/nightly/control.template @@ -0,0 +1,11 @@ +Package: riot-nightly +License: Apache-2.0 +Vendor: support@riot.im +Architecture: amd64 +Maintainer: support@riot.im +Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libappindicator3-1, libsecret-1-0, libsqlcipher0 +Section: net +Priority: extra +Homepage: https://riot.im/ +Description: + A feature-rich client for Matrix.org (nightly unstable build). From a1366992bc512418af7b71251d237519eb5180c1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Sat, 7 Mar 2020 16:12:59 +0000 Subject: [PATCH 3/3] Remove things that now live in riot-builder --- package.json | 5 ----- scripts/set-version.js | 31 +++---------------------------- 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 60a9036..efa0da8 100644 --- a/package.json +++ b/package.json @@ -85,11 +85,6 @@ "StartupWMClass": "riot" } }, - "deb": { - "fpm": [ - "--deb-custom-control=pkg/control" - ] - }, "mac": { "category": "public.app-category.social-networking", "darkModeSupport": true diff --git a/scripts/set-version.js b/scripts/set-version.js index 546459a..169556f 100755 --- a/scripts/set-version.js +++ b/scripts/set-version.js @@ -40,41 +40,16 @@ async function setPackageVersion(ver) { }); } -async function setDebVersion(ver) { - // Also create a debian package control file with the version. - // We use a custom control file so we need to do this ourselves - const outFile = await fs.open('pkg/control', 'w'); - const template = await fs.readFile('pkg/control.template'); - await outFile.write(template); - await outFile.write('Version: ' + ver + "\n"); - await outFile.close(); - - console.log("Version set to " + ver); -} - async function main(args) { - let setDeb = false; - let setPkg = false; - let version; - - for (const arg of args) { - if (arg === '--deb') { - setDeb = true; - } else if (arg === '--pkg') { - setPkg = true; - } else { - version = arg; - } - } + let version = args[0]; if (version === undefined) version = await versionFromAsar(); - if (setPkg) await setPackageVersion(version); - if (setDeb) await setDebVersion(version); + await setPackageVersion(version); } if (require.main === module) { main(process.argv.slice(2)).then((ret) => process.exit(ret)); } -module.exports = {versionFromAsar, setPackageVersion, setDebVersion}; +module.exports = {versionFromAsar, setPackageVersion};