Some improvements to adhoc builds
This commit is contained in:
parent
ec26b82ba7
commit
f55abcbdc8
2 changed files with 13 additions and 5 deletions
|
@ -6,7 +6,7 @@ const _ = require('lodash');
|
||||||
const { execSync } = require('child_process');
|
const { execSync } = require('child_process');
|
||||||
|
|
||||||
const packageJson = require('../package.json');
|
const packageJson = require('../package.json');
|
||||||
const { isAdHoc } = require('../ts/util/version');
|
const { isAdhoc } = require('../ts/util/version');
|
||||||
|
|
||||||
const { version } = packageJson;
|
const { version } = packageJson;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ const { version } = packageJson;
|
||||||
// debian package name, the install directory under /opt on linux, etc. We tried
|
// debian package name, the install directory under /opt on linux, etc. We tried
|
||||||
// adding the ${channel} macro to these values, but Electron-Builder didn't like that.
|
// adding the ${channel} macro to these values, but Electron-Builder didn't like that.
|
||||||
|
|
||||||
if (!isAdHoc(version)) {
|
if (!isAdhoc(version)) {
|
||||||
console.error(`Version '${version}' is not an adhoc version!`);
|
console.error(`Version '${version}' is not an adhoc version!`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ const ADHOC_NAME = `signal-desktop-adhoc-${formattedDate}-${shortSha}`;
|
||||||
|
|
||||||
const PRODUCT_NAME_PATH = 'productName';
|
const PRODUCT_NAME_PATH = 'productName';
|
||||||
const PRODUCTION_PRODUCT_NAME = 'Signal';
|
const PRODUCTION_PRODUCT_NAME = 'Signal';
|
||||||
const ADHOC_PRODUCT_NAME = `Signal AdHoc ${formattedDate} ${shortSha}`;
|
const ADHOC_PRODUCT_NAME = `Signal Adhoc ${formattedDate}.${shortSha}`;
|
||||||
|
|
||||||
const APP_ID_PATH = 'build.appId';
|
const APP_ID_PATH = 'build.appId';
|
||||||
const PRODUCTION_APP_ID = 'org.whispersystems.signal-desktop';
|
const PRODUCTION_APP_ID = 'org.whispersystems.signal-desktop';
|
||||||
|
@ -61,7 +61,7 @@ const ADHOC_APP_ID = `org.whispersystems.signal-desktop-adhoc-${formattedDate}-$
|
||||||
|
|
||||||
const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass';
|
const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass';
|
||||||
const PRODUCTION_STARTUP_WM_CLASS = 'Signal';
|
const PRODUCTION_STARTUP_WM_CLASS = 'Signal';
|
||||||
const ADHOC_STARTUP_WM_CLASS = `Signal AdHoc ${formattedDate} ${shortSha}`;
|
const ADHOC_STARTUP_WM_CLASS = `Signal Adhoc ${formattedDate}.${shortSha}`;
|
||||||
|
|
||||||
const DESKTOP_NAME_PATH = 'desktopName';
|
const DESKTOP_NAME_PATH = 'desktopName';
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,8 @@ import { execSync } from 'child_process';
|
||||||
import { writeFileSync } from 'fs';
|
import { writeFileSync } from 'fs';
|
||||||
|
|
||||||
import { DAY } from '../util/durations';
|
import { DAY } from '../util/durations';
|
||||||
|
import { version } from '../../package.json';
|
||||||
|
import { isAdhoc } from '../util/version';
|
||||||
|
|
||||||
const unixTimestamp = parseInt(
|
const unixTimestamp = parseInt(
|
||||||
process.env.SOURCE_DATE_EPOCH ||
|
process.env.SOURCE_DATE_EPOCH ||
|
||||||
|
@ -20,7 +22,13 @@ const localProductionPath = join(
|
||||||
__dirname,
|
__dirname,
|
||||||
'../../config/local-production.json'
|
'../../config/local-production.json'
|
||||||
);
|
);
|
||||||
const localProductionConfig = { buildCreation, buildExpiration };
|
|
||||||
|
const localProductionConfig = {
|
||||||
|
buildCreation,
|
||||||
|
buildExpiration,
|
||||||
|
...(isAdhoc(version) ? { updatesEnabled: false } : {}),
|
||||||
|
};
|
||||||
|
|
||||||
writeFileSync(
|
writeFileSync(
|
||||||
localProductionPath,
|
localProductionPath,
|
||||||
`${JSON.stringify(localProductionConfig)}\n`
|
`${JSON.stringify(localProductionConfig)}\n`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue