mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 02:23:28 +08:00
[*] Postinstall should install client-sync regardless of private plugins
Summary: see title Test Plan: manual Reviewers: spang, evan, mark, halla Reviewed By: halla Differential Revision: https://phab.nylas.com/D4445
This commit is contained in:
parent
8d21d89f0a
commit
148fbfd936
1 changed files with 12 additions and 8 deletions
|
@ -32,7 +32,16 @@ function copyErrorLoggerExtensions(privateDir) {
|
|||
fs.copySync(from, to);
|
||||
}
|
||||
|
||||
async function installPrivateResources() {
|
||||
function installClientSyncPackage() {
|
||||
console.log("\n---> Linking client-sync")
|
||||
// link client-sync
|
||||
const clientSyncDir = path.resolve(path.join('packages', 'client-sync'));
|
||||
const destination = path.resolve(path.join('packages', 'client-app', 'internal_packages', 'client-sync'));
|
||||
unlinkIfExistsSync(destination);
|
||||
fs.symlinkSync(clientSyncDir, destination, 'dir');
|
||||
}
|
||||
|
||||
function installPrivateResources() {
|
||||
console.log("\n---> Linking private plugins")
|
||||
const privateDir = path.resolve(path.join('packages', 'client-private-plugins'))
|
||||
if (!fs.existsSync(privateDir)) {
|
||||
|
@ -49,12 +58,6 @@ async function installPrivateResources() {
|
|||
unlinkIfExistsSync(to);
|
||||
fs.symlinkSync(from, to, 'dir');
|
||||
}
|
||||
|
||||
// link client-sync
|
||||
const clientSyncDir = path.resolve(path.join('packages', 'client-sync'));
|
||||
const destination = path.resolve(path.join('packages', 'client-app', 'internal_packages', 'client-sync'));
|
||||
unlinkIfExistsSync(destination);
|
||||
fs.symlinkSync(clientSyncDir, destination, 'dir');
|
||||
}
|
||||
|
||||
async function lernaBootstrap(installTarget) {
|
||||
|
@ -161,7 +164,8 @@ async function main() {
|
|||
console.log(`\n---> Installing for target ${installTarget}`);
|
||||
|
||||
if ([TARGET_ALL, TARGET_CLIENT].includes(installTarget)) {
|
||||
await installPrivateResources()
|
||||
installPrivateResources()
|
||||
installClientSyncPackage()
|
||||
}
|
||||
|
||||
await lernaBootstrap(installTarget);
|
||||
|
|
Loading…
Reference in a new issue