mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Merge pull request #44 from vector-im/dbkr/move_deb_control
Move deb control logic to builder
This commit is contained in:
commit
3f77d0c70e
@ -85,11 +85,6 @@
|
|||||||
"StartupWMClass": "riot"
|
"StartupWMClass": "riot"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"deb": {
|
|
||||||
"fpm": [
|
|
||||||
"--deb-custom-control=pkg/control"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mac": {
|
"mac": {
|
||||||
"category": "public.app-category.social-networking",
|
"category": "public.app-category.social-networking",
|
||||||
"darkModeSupport": true
|
"darkModeSupport": true
|
||||||
|
11
riot.im/nightly/control.template
Normal file
11
riot.im/nightly/control.template
Normal file
@ -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).
|
@ -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) {
|
async function main(args) {
|
||||||
let setDeb = false;
|
let version = args[0];
|
||||||
let setPkg = false;
|
|
||||||
let version;
|
|
||||||
|
|
||||||
for (const arg of args) {
|
|
||||||
if (arg === '--deb') {
|
|
||||||
setDeb = true;
|
|
||||||
} else if (arg === '--pkg') {
|
|
||||||
setPkg = true;
|
|
||||||
} else {
|
|
||||||
version = arg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (version === undefined) version = await versionFromAsar();
|
if (version === undefined) version = await versionFromAsar();
|
||||||
|
|
||||||
if (setPkg) await setPackageVersion(version);
|
await setPackageVersion(version);
|
||||||
if (setDeb) await setDebVersion(version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
main(process.argv.slice(2)).then((ret) => process.exit(ret));
|
main(process.argv.slice(2)).then((ret) => process.exit(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {versionFromAsar, setPackageVersion, setDebVersion};
|
module.exports = {versionFromAsar, setPackageVersion};
|
||||||
|
Loading…
Reference in New Issue
Block a user