|
|
|
|
|
|
|
|
|
|
|
|
|
|
var performPull = (repo, branch) => { |
|
|
var performPull = (repo, branch) => { |
|
|
if (existsSync(instanceroot + '/' + repo)) { |
|
|
if (existsSync(instanceroot + '/' + repo)) { |
|
|
console.log('pulling ' + instanceroot + '/' + repo + 'branch ' + branch) |
|
|
|
|
|
|
|
|
var branchprint = branch ? ' branch :' + branch : ''; |
|
|
|
|
|
console.log('pulling ' + instanceroot + '/' + repo + branchprint ) |
|
|
return nodeShellExec.apply(null, getPullCmd(repo, branch)).then(() => { |
|
|
return nodeShellExec.apply(null, getPullCmd(repo, branch)).then(() => { |
|
|
if (__isElevated) { |
|
|
if (__isElevated) { |
|
|
fs.writeFileSync('run.log', ', ' + JSON.stringify({ repo, success: true }), { 'flag': 'a+' }) |
|
|
fs.writeFileSync('run.log', ', ' + JSON.stringify({ repo, success: true }), { 'flag': 'a+' }) |