浏览代码

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

production
Pradeep Bhaskaran 4 年前
父节点
当前提交
ef4dcd607c
共有 1 个文件被更改,包括 16 次插入8 次删除
  1. 16
    8
      index.js

+ 16
- 8
index.js 查看文件

@@ -24,6 +24,17 @@ var globSync = require('glob').sync;

var path = require('path');
const { isMaster } = require('cluster');

// Default Config...
var reposervers = [
'http://git.bbh'
, '//172.16.0.27/repos'
]
var defaultRepoServer = reposervers[0]

var currentGitAuthUser ; // nodeShellExec('git', ['config', 'user.email']) ... PB : TODO-- get the current gittea username
var defaultRepoOwner = 'chess';

// Serialize a set of functions that will execute to return a promises one after the other.
// Will stop when any one fails unless continueOnFailure is true.
// All tasks in iterables can be functions or promises.
@@ -153,6 +164,7 @@ var gitRepos = [
, 'elxr'
, 'ember-searchable-select'
, 'loopback-component-jsonapi'
, 'loopback-jsonapi-model-serializer'
, 'elixir-config-development'
, 'elixir-config-test'
, 'cihsr-config'
@@ -367,12 +379,7 @@ var __runcmd = function(label){
// git push origin master

var repo = processedArgs._[1];
var reposervers = [
'http://git.bbh'
, '//172.16.0.27/repos'
]
var defaultRepoServer = reposervers[0]

var sequentialTaskShellCommands = [];
if(!existsSync(`Z:/${repo}.git`)){
sequentialTaskShellCommands = [
@@ -616,7 +623,8 @@ var __runcmd = function(label){
}
else {
console.log('cloning ' + repo)
return nodeShellExec('git', ['clone', '-c', 'core.symlinks=true', defaultRepoServer + '/' + repo + '.git'],
// PB : TODO -- detect if a clonable repo exists in currentGitAuthUser
return nodeShellExec('git', ['clone', '-c', 'core.symlinks=true', defaultRepoServer + `/${defaultRepoOwner}/` + repo + '.git'],
{
inherit : true, shell: true,
env: process.env
@@ -629,7 +637,7 @@ var __runcmd = function(label){
env: process.env
, cwd : repo
, runas : processedArgs.runas
, title : `git core.symlinks --replace-all true for ${defaultRepoServer + '/' + repo + '.git'}`
, title : `git core.symlinks --replace-all true for ${defaultRepoServer + `/${defaultRepoOwner}/` + repo + '.git'}`
})
})
}

正在加载...
取消
保存