Преглед на файлове

fixed npm i for client

pull/4/head
anish преди 3 години
родител
ревизия
de8916fbe1
променени са 2 файла, в които са добавени 33 реда и са изтрити 13 реда
  1. 31
    7
      index.js
  2. 2
    6
      package.json

+ 31
- 7
index.js Целия файл

@@ -77,6 +77,7 @@ var getTaskCheckExists = (command, options) => {
}

var getPullCmd = (repo, branch) => {
// console.log(useGitPull)var getPullCmd = (repo, branch) => {
// console.log(useGitPull)

if(branch) {
@@ -100,12 +101,27 @@ var getPullCmd = (repo, branch) => {
return pullCmd
}

// var getPullCmd = (repo, branch) => {
// var pullCmd = [gitbash
// , ['-c', 'branch=`git rev-parse --abbrev-ref HEAD`;for i in `git remote`; do git pull $i $branch; done;']
// , { cwd: instanceroot + '/' + repo, title: 'pull all origins for ' + repo }]
// // var pullCmd = ['pullall', [], { cwd : repo }]
// if (useGitPull) pullCmd = ['git', ['pull'], {
// inherit: true, shell: true,
// cwd: instanceroot + '/' + repo
// // , env: process.env
// , runas: processedArgs.runas
// , title: `git pull ${repo}`
// }]
// return pullCmd
// }

var performPull = (repo, branch) => {
if (existsSync(instanceroot + '/' + repo)) {
var branchprint = branch ? ' branch :' + branch : '';
console.log('pulling ' + instanceroot + '/' + repo + branchprint )
return nodeShellExec.apply(null, getPullCmd(repo, branch)).then(() => {
if (__isElevated) {
if (__isElevated) {
fs.writeFileSync('run.log', ', ' + JSON.stringify({ repo, success: true }), { 'flag': 'a+' })
}
else statuslog.statuslog(null, repo)
@@ -765,11 +781,14 @@ var op = {
gitRepos = gitRepos.concat(elevatedRunasRepos);

// gitRepos = [
// 'bbhverse', 'serververse', 'elixir-server',
// // 'bbhverse', 'serververse', 'elixir-server',
// // 'clientverse',
// 'client'
// ];
var rmtasks = []
var repotasks = []
var env = Object.assign({}, process.env)
delete env.NODE_ENV
gitRepos.forEach(repo => {

rmtasks.push(
@@ -795,25 +814,30 @@ var op = {
var p = nodeShellExec('npm', ['i', '--force'], {
inherit: true, shell: true
, cwd: instanceroot + '/' + repo
, env: process.env
, env
, title: `npm i for ${repo}`
}).then(Tasq.then).catch(Tasq.catch)
}).then(Tasq.then).catch(Tasq.catch)
return p;
})
}
})


// PB : TODO -- npm i for client is for some reason not complete so bower doesn't get installed !!!
// PB : NOTE -- npm i for client does not complete when NODE_ENV=production
// therefore bower doesn't get installed !!! which then fails installing the bower dependenciew !!!
// We work around this by running npm i for client without any NODE_ENV which probably defualts to development.
// PB : TODO -- Investigate why NODE_ENF has an impact on npm i !??
// Second time try also doesnt work.
// repotasks.push(
// () => {
// var env = Object.assign({}, process.env)
// delete env.NODE_ENV
// console.log(`--------------------second time npm i for client--------------------`)
// return nodeShellExec(`"${gitbash}"`, ['-c', '"npm i"'], {
// return nodeShellExec(`"${gitbash}"`, ['-c', '"npm i --force"'], {
// // return nodeShellExec('npm', ['i --force'], {
// inherit: true, shell: true
// , cwd: instanceroot + '/' + 'client'
// , env: process.env
// , env
// , title: `npm i for client`
// }).then(Tasq.then).catch(Tasq.catch)
// })

+ 2
- 6
package.json Целия файл

@@ -6,17 +6,13 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build-commented": "rollup index.js --format cjs --file elxr.js",
"build": "rollup -c",
"index": "SET FORCE_COLOR=true && node index"
"build": "rollup -c"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bbhverse": "git+http://git.bbh/chess/bbhverse",
"global-this": "git+http://git.bbh/chess/global-this",
"moment": "^2.27.0",
"crossfilter2": "^1.5.4",
"bbhverse": "file:../bbhverse",
"chalk": "^4.1.0",
"glob": "^7.1.2",
"tree-kill": "^1.2.2"

Loading…
Отказ
Запис