Browse Source

Merge branch 'master' of http://git.bbh.org.in/chess/elxr

master
Aksha Thomas 3 years ago
parent
commit
30f1dd5515
1 changed files with 9 additions and 8 deletions
  1. 9
    8
      index.js

+ 9
- 8
index.js View File

) ) ) )


var npmbuildrepos = ['loopback-jsonapi-model-serializer'] var npmbuildrepos = ['loopback-jsonapi-model-serializer']
npmbuildrepos = []
// npmbuildrepos = []
npmbuildrepos.forEach(repo => { npmbuildrepos.forEach(repo => {
tasks.push(() => { tasks.push(() => {
return nodeShellExec('npm', ['i --force'], { return nodeShellExec('npm', ['i --force'], {
}) })
}) })


any(tasks).then(() => {
return any(tasks).then(() => {


gitRepos.push('client/server');
gitRepos.push('chess-server-lib/server');
gitRepos = gitRepos.concat(elevatedRunasRepos); gitRepos = gitRepos.concat(elevatedRunasRepos);


// gitRepos = [ // gitRepos = [
var env = Object.assign({}, process.env) var env = Object.assign({}, process.env)
delete env.NODE_ENV delete env.NODE_ENV
gitRepos.forEach(repodef => { gitRepos.forEach(repodef => {

rmtasks.push( rmtasks.push(
// () => { // () => {
// console.log(`--rm package-lock.json for ${repodef.repo}--------------------`) // console.log(`--rm package-lock.json for ${repodef.repo}--------------------`)
// return nodeShellExec(`"${gitbash}"`, ['-c', '"rm package-lock.json"'], { // return nodeShellExec(`"${gitbash}"`, ['-c', '"rm package-lock.json"'], {
(callShellTask(['rm', ['package-lock.json'], {
callshelltask(['rm', ['package-lock.json'], {
inherit: true, shell: true inherit: true, shell: true
, cwd: instanceroot + '/' + repodef.repo , cwd: instanceroot + '/' + repodef.repo
, env: process.env , env: process.env
, title: `rm 'package-lock.json' for ${repodef.repo}` , title: `rm 'package-lock.json' for ${repodef.repo}`
}]))()
}])
.then(()=>{ .then(()=>{
console.log(`--rm package-lock.json for ${repodef.repo}--------------------`) console.log(`--rm package-lock.json for ${repodef.repo}--------------------`)
}).catch((e) => { console.error(e) }) }).catch((e) => { console.error(e) })
// console.log('rmtasks.length : ' + rmtasks.length) // console.log('rmtasks.length : ' + rmtasks.length)
return Promise.all(rmtasks).then(() => any(repotasks)); return Promise.all(rmtasks).then(() => any(repotasks));
}).catch(e => { }).catch(e => {
console.error(e)
}).finally(statuslog.finally) }).finally(statuslog.finally)


} }


console.log(`No change detected. Already using requested specs : ${runconfig.NODE_ENV} ${runconfig.use}`) console.log(`No change detected. Already using requested specs : ${runconfig.NODE_ENV} ${runconfig.use}`)
if (processedArgs.runas) { fs.writeFileSync('run.done', 'success') } if (processedArgs.runas) { fs.writeFileSync('run.done', 'success') }
return
if (existsSync('config') && existsSync('data')){
return
}
} }


var tasks = [ var tasks = [

Loading…
Cancel
Save