|
|
|
|
|
|
|
|
var productionRepos = [ |
|
|
var productionRepos = [ |
|
|
'elixir-config-production' |
|
|
'elixir-config-production' |
|
|
] |
|
|
] |
|
|
var productionIsAllowed = true; |
|
|
|
|
|
|
|
|
var productionIsAllowed = (process.env.NODE_ENV === 'production'); |
|
|
if(productionIsAllowed) gitRepos = gitRepos.concat(productionRepos) |
|
|
if(productionIsAllowed) gitRepos = gitRepos.concat(productionRepos) |
|
|
|
|
|
|
|
|
var env = Object.assign({}, process.env); // Shallow clone it. |
|
|
var env = Object.assign({}, process.env); // Shallow clone it. |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
, 'npmi' : ()=>{ |
|
|
, 'npmi' : ()=>{ |
|
|
var tasks = []; |
|
|
var tasks = []; |
|
|
|
|
|
var bowerRepos = ['client'] |
|
|
|
|
|
|
|
|
|
|
|
var npmbuildrepos = ['loopback-jsonapi-model-serializer'] |
|
|
|
|
|
npmbuildrepos.forEach(repo => { |
|
|
|
|
|
tasks.push(()=>{ |
|
|
|
|
|
var p = nodeShellExec('npm', ['run build'], { |
|
|
|
|
|
inherit : true, shell: true |
|
|
|
|
|
, cwd : repo |
|
|
|
|
|
, env: process.env |
|
|
|
|
|
, title : `bower i for ${repo}` |
|
|
|
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
|
|
|
return p; |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
bowerRepos.forEach(repo => { |
|
|
|
|
|
tasks.push(()=>{ |
|
|
|
|
|
var p = nodeShellExec('bower', ['install'], { |
|
|
|
|
|
inherit : true, shell: true |
|
|
|
|
|
, cwd : repo |
|
|
|
|
|
, env: process.env |
|
|
|
|
|
, title : `bower i for ${repo}` |
|
|
|
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
|
|
|
return p; |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
gitRepos = gitRepos.concat(elevatedRunasRepos); |
|
|
|
|
|
gitRepos.push('client/server'); |
|
|
gitRepos.forEach(repo => { |
|
|
gitRepos.forEach(repo => { |
|
|
|
|
|
|
|
|
console.log('npm i for ' + repo) |
|
|
console.log('npm i for ' + repo) |
|
|
|
|
|
|
|
|
, env: process.env |
|
|
, env: process.env |
|
|
, title : `rm 'package-lock.json' for ${repo}` |
|
|
, title : `rm 'package-lock.json' for ${repo}` |
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
tasks.push(()=>{ |
|
|
|
|
|
var p = nodeShellExec('npm', ['i'], { |
|
|
|
|
|
inherit : true, shell: true |
|
|
|
|
|
, cwd : repo |
|
|
|
|
|
, env: process.env |
|
|
|
|
|
, title : `npm i for ${repo}` |
|
|
|
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
|
|
|
return p; |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( npmbuildrepos.indexOf(repo) != -1) { |
|
|
|
|
|
tasks.push(()=>{ |
|
|
|
|
|
var p = nodeShellExec('npm', ['i --force'], { |
|
|
|
|
|
inherit : true, shell: true |
|
|
|
|
|
, cwd : repo |
|
|
|
|
|
, env: process.env |
|
|
|
|
|
, title : `npm i for ${repo}` |
|
|
|
|
|
}).catch((e)=>{ console.error(e) }) |
|
|
|
|
|
return p; |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
any(tasks); |
|
|
any(tasks); |
|
|
|
|
|
|