commit
7e2110015f
@ -1,6 +0,0 @@
|
||||
{
|
||||
"storageProfile": "testIntegration2Profile",
|
||||
"openDevTools": false,
|
||||
"updatesEnabled": false,
|
||||
"localServerPort": "8082"
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"storageProfile": "development1",
|
||||
"localServerPort": "8082",
|
||||
"seedNodeList": [
|
||||
{
|
||||
"ip": "public.loki.foundation",
|
||||
"port": "38157"
|
||||
},
|
||||
{
|
||||
"ip": "storage.testnetseed1.loki.network",
|
||||
"port": "38157"
|
||||
}
|
||||
],
|
||||
"openDevTools": true,
|
||||
"defaultPublicChatServer": "https://chat-dev.lokinet.org/"
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"storageProfile": "development2",
|
||||
"localServerPort": "8083",
|
||||
"seedNodeList": [
|
||||
{
|
||||
"ip": "public.loki.foundation",
|
||||
"port": "38157"
|
||||
},
|
||||
{
|
||||
"ip": "storage.testnetseed1.loki.network",
|
||||
"port": "38157"
|
||||
}
|
||||
],
|
||||
"openDevTools": true,
|
||||
"defaultPublicChatServer": "https://chat-dev.lokinet.org/"
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"storageProfile": "devprod1Profile",
|
||||
"localServerPort": "8082",
|
||||
"openDevTools": true,
|
||||
"updatesEnabled": false
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"storageProfile": "devprodProfile",
|
||||
"openDevTools": true,
|
||||
"updatesEnabled": false
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"openDevTools": true,
|
||||
"updatesEnabled": false
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
{
|
||||
"storageProfile": "staging",
|
||||
"openDevTools": true
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"storageProfile": "swarm-testing2",
|
||||
"seedNodeList": [
|
||||
{
|
||||
"ip": "localhost",
|
||||
"port": "22129"
|
||||
}
|
||||
],
|
||||
"openDevTools": true,
|
||||
"defaultPublicChatServer": "https://team-chat.lokinet.org/"
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
"storageProfile": "testIntegrationProfile",
|
||||
"openDevTools": false,
|
||||
"updatesEnabled": false
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const fs = require('fs');
|
||||
const _ = require('lodash');
|
||||
|
||||
const packageJson = require('./package.json');
|
||||
|
||||
const { version } = packageJson;
|
||||
const beta = /beta/;
|
||||
|
||||
// You might be wondering why this file is necessary. It comes down to our desire to allow
|
||||
// side-by-side installation of production and beta builds. Electron-Builder uses
|
||||
// top-level data from package.json for many things, like the executable name, the
|
||||
// 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.
|
||||
|
||||
if (!beta.test(version)) {
|
||||
process.exit();
|
||||
}
|
||||
|
||||
console.log('prepare_beta_build: updating package.json');
|
||||
|
||||
// -------
|
||||
|
||||
const NAME_PATH = 'name';
|
||||
const PRODUCTION_NAME = 'loki-messenger-desktop';
|
||||
const BETA_NAME = 'loki-messenger-desktop-beta';
|
||||
|
||||
const PRODUCT_NAME_PATH = 'productName';
|
||||
const PRODUCTION_PRODUCT_NAME = 'Session';
|
||||
const BETA_PRODUCT_NAME = 'Session Beta';
|
||||
|
||||
const APP_ID_PATH = 'build.appId';
|
||||
const PRODUCTION_APP_ID = 'com.loki-project.messenger-desktop';
|
||||
const BETA_APP_ID = 'com.loki-project.messenger-desktop-beta';
|
||||
|
||||
const STARTUP_WM_CLASS_PATH = 'build.linux.desktop.StartupWMClass';
|
||||
const PRODUCTION_STARTUP_WM_CLASS = 'Session';
|
||||
const BETA_STARTUP_WM_CLASS = 'Session Beta';
|
||||
|
||||
// -------
|
||||
|
||||
function checkValue(object, objectPath, expected) {
|
||||
const actual = _.get(object, objectPath);
|
||||
if (actual !== expected) {
|
||||
throw new Error(`${objectPath} was ${actual}; expected ${expected}`);
|
||||
}
|
||||
}
|
||||
|
||||
// ------
|
||||
|
||||
checkValue(packageJson, NAME_PATH, PRODUCTION_NAME);
|
||||
checkValue(packageJson, PRODUCT_NAME_PATH, PRODUCTION_PRODUCT_NAME);
|
||||
checkValue(packageJson, APP_ID_PATH, PRODUCTION_APP_ID);
|
||||
checkValue(packageJson, STARTUP_WM_CLASS_PATH, PRODUCTION_STARTUP_WM_CLASS);
|
||||
|
||||
// -------
|
||||
|
||||
_.set(packageJson, NAME_PATH, BETA_NAME);
|
||||
_.set(packageJson, PRODUCT_NAME_PATH, BETA_PRODUCT_NAME);
|
||||
_.set(packageJson, APP_ID_PATH, BETA_APP_ID);
|
||||
_.set(packageJson, STARTUP_WM_CLASS_PATH, BETA_STARTUP_WM_CLASS);
|
||||
|
||||
// -------
|
||||
|
||||
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, ' '));
|
@ -1,69 +0,0 @@
|
||||
/* eslint-disable no-console */
|
||||
|
||||
const fs = require('fs');
|
||||
const _ = require('lodash');
|
||||
|
||||
const packageJson = require('./package.json');
|
||||
const defaultConfig = require('./config/default.json');
|
||||
|
||||
function checkValue(object, objectPath, expected) {
|
||||
const actual = _.get(object, objectPath);
|
||||
if (actual !== expected) {
|
||||
throw new Error(`${objectPath} was ${actual}; expected ${expected}`);
|
||||
}
|
||||
}
|
||||
|
||||
// You might be wondering why this file is necessary. We have some very specific
|
||||
// requirements around our import-flavor builds. They need to look exactly the same as
|
||||
// normal builds, but they must immediately open into import mode. So they need a
|
||||
// slight config tweak, and then a change to the .app/.exe name (note: we do NOT want to
|
||||
// change where data is stored or anything, since that would make these builds
|
||||
// incompatible with the mainline builds) So we just change the artifact name.
|
||||
//
|
||||
// Another key thing to know about these builds is that we should not upload the
|
||||
// latest.yml (windows) and latest-mac.yml (mac) that go along with the executables.
|
||||
// This would interrupt the normal install flow for users installing from
|
||||
// signal.org/download. So any release script will need to upload these files manually
|
||||
// instead of relying on electron-builder, which will upload everything.
|
||||
|
||||
// -------
|
||||
|
||||
console.log('prepare_import_build: updating config/default.json');
|
||||
|
||||
const IMPORT_PATH = 'import';
|
||||
const IMPORT_START_VALUE = false;
|
||||
const IMPORT_END_VALUE = true;
|
||||
|
||||
checkValue(defaultConfig, IMPORT_PATH, IMPORT_START_VALUE);
|
||||
|
||||
_.set(defaultConfig, IMPORT_PATH, IMPORT_END_VALUE);
|
||||
|
||||
// -------
|
||||
|
||||
console.log('prepare_import_build: updating package.json');
|
||||
|
||||
const MAC_ASSET_PATH = 'build.mac.artifactName';
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
const MAC_ASSET_START_VALUE = '${name}-mac-${version}.${ext}';
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
const MAC_ASSET_END_VALUE = '${name}-mac-${version}-import.${ext}';
|
||||
|
||||
const WIN_ASSET_PATH = 'build.win.artifactName';
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
const WIN_ASSET_START_VALUE = '${name}-win-${version}.${ext}';
|
||||
// eslint-disable-next-line no-template-curly-in-string
|
||||
const WIN_ASSET_END_VALUE = '${name}-win-${version}-import.${ext}';
|
||||
|
||||
checkValue(packageJson, MAC_ASSET_PATH, MAC_ASSET_START_VALUE);
|
||||
checkValue(packageJson, WIN_ASSET_PATH, WIN_ASSET_START_VALUE);
|
||||
|
||||
_.set(packageJson, MAC_ASSET_PATH, MAC_ASSET_END_VALUE);
|
||||
_.set(packageJson, WIN_ASSET_PATH, WIN_ASSET_END_VALUE);
|
||||
|
||||
// ---
|
||||
|
||||
fs.writeFileSync(
|
||||
'./config/default.json',
|
||||
JSON.stringify(defaultConfig, null, ' ')
|
||||
);
|
||||
fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, ' '));
|
Loading…
Reference in New Issue