Merge pull request #14 from vector-im/dbkr/debcontrol
Use a custom control file for the Debian package
This commit is contained in:
@@ -18,6 +18,9 @@ async function main() {
|
||||
}
|
||||
|
||||
const ver = asar.extractFile('webapp.asar', 'version').toString().trim();
|
||||
|
||||
// set version in package.json: electron-builder will use this to populate
|
||||
// all the various version fields
|
||||
await new Promise((resolve, reject) => {
|
||||
child_process.execFile('yarn', [
|
||||
'version',
|
||||
@@ -33,6 +36,15 @@ async function main() {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user