[*] 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:
Juan Tejada 2017-04-17 17:37:26 -07:00
parent 8d21d89f0a
commit 148fbfd936

View file

@ -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);