Skip to content

Commit

Permalink
fix(core.gbapp): Self-replication on Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed May 27, 2019
1 parent 05edafd commit 3cca504
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/core.gbapp/services/GBDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,22 @@ export class GBDeployer {
return { generalPackages, totalPackages };
}

private isSystemPackage(name: string): Boolean {
const names = ['core.gbapp', 'admin.gbapp', 'azuredeployer.gbapp', 'customer-satisfaction.gbapp', 'kb.gbapp'];

return names.indexOf(name) > -1;
}

private deployAppPackages(gbappPackages: string[], core: any, appPackages: any[]) {
let appPackagesProcessed = 0;
gbappPackages.forEach(e => {
const filenameOnly = Path.basename(e);

// Skips .gbapp inside deploy folder.
if (!e.startsWith('packages')) {
GBLog.info(`Deploying app: ${e}...`);
if (this.isSystemPackage(filenameOnly) === false) {

GBLog.info(`Deploying app: ${e}...`);
let folder = Path.join(e, 'node_modules');
let
if (!Fs.existsSync(folder)) {
GBLog.info(`Installing modules for ${e}...`);
child_process.execSync('npm install', { cwd: e });
Expand Down

0 comments on commit 3cca504

Please sign in to comment.