Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fuyue82
o2oa
提交
8e58ebca
o2oa
项目概览
fuyue82
/
o2oa
与 Fork 源项目一致
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8e58ebca
编写于
4月 17, 2020
作者:
NoSubject
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改gulpfile,从gitlab下载commons和jvm
上级
96ea6b4f
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
67 addition
and
17 deletion
+67
-17
gulpfile.js
gulpfile.js
+67
-17
未找到文件。
gulpfile.js
浏览文件 @
8e58ebca
...
@@ -17,20 +17,35 @@ var fg = require('fast-glob');
...
@@ -17,20 +17,35 @@ var fg = require('fast-glob');
var
logger
=
require
(
'
gulp-logger
'
);
var
logger
=
require
(
'
gulp-logger
'
);
//var downloadHost = "download.o2oa.net";
//var downloadHost = "download.o2oa.net";
var
downloadHost
=
"
release.o2oa.net
"
;
// var downloadHost = "release.o2oa.net";
var
protocol
=
"
http
"
;
// var protocol = "http";
var
commonUrl
=
"
/build/commons.tar.gz
"
;
// var commonUrl = "/build/commons.tar.gz";
// var jvmUrls = {
// "all": "/build/jvm.tar.gz",
// "linux": "/build/linux.tar.gz",
// "aix": "/build/aix.tar.gz",
// "arm": "/build/arm.tar.gz",
// "macos": "/build/macos.tar.gz",
// "risc": "/build/risc.tar.gz",
// "raspberrypi": "/build/raspberrypi.tar.gz",
// "windows": "/build/windows.tar.gz"
// };
var
downloadHost
=
"
git.o2oa.net
"
;
var
protocol
=
"
https
"
;
var
commonUrl
=
"
/o2oa/evn-o2server-commons/-/archive/master/evn-o2server-commons-master.tar.gz?path=commons
"
;
var
jvmUrls
=
{
var
jvmUrls
=
{
"
all
"
:
"
/
build/jvm.tar.gz
"
,
"
all
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm
"
,
"
linux
"
:
"
/
build/linux.tar.gz
"
,
"
linux
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/linux
"
,
"
aix
"
:
"
/
build/aix.tar.gz
"
,
"
aix
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/aix
"
,
"
arm
"
:
"
/
build/arm.tar.gz
"
,
"
arm
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/arm
"
,
"
macos
"
:
"
/
build/macos.tar.gz
"
,
"
macos
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/macos
"
,
"
risc
"
:
"
/
build/risc.tar.gz
"
,
"
risc
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/risc
"
,
"
raspberrypi
"
:
"
/
build/raspberrypi.tar.gz
"
,
"
raspberrypi
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/raspberrypi
"
,
"
windows
"
:
"
/
build/windows.tar.gz
"
"
windows
"
:
"
/
o2oa/evn-o2server-jvm/-/archive/master/evn-o2server-jvm-master.tar.gz?path=jvm/windows
"
};
};
var
scripts
=
{
var
scripts
=
{
"
all
"
:
[
"
o2server/*.sh
"
,
"
o2server/*.jar
"
,
"
o2server/*.html
"
,
"
o2server/*.bat
"
,
"
o2server/version.o2
"
],
"
all
"
:
[
"
o2server/*.sh
"
,
"
o2server/*.jar
"
,
"
o2server/*.html
"
,
"
o2server/*.bat
"
,
"
o2server/version.o2
"
],
"
linux
"
:
[
"
o2server/*linux*
"
,
"
o2server/*.jar
"
,
"
o2server/*.html
"
,
"
o2server/version.o2
"
],
"
linux
"
:
[
"
o2server/*linux*
"
,
"
o2server/*.jar
"
,
"
o2server/*.html
"
,
"
o2server/version.o2
"
],
...
@@ -164,7 +179,7 @@ function download_commons_and_jvm(cb){
...
@@ -164,7 +179,7 @@ function download_commons_and_jvm(cb){
var
downloader
=
new
Promise
((
resolve
,
reject
)
=>
{
var
downloader
=
new
Promise
((
resolve
,
reject
)
=>
{
var
commonLoaded
=
false
;
var
commonLoaded
=
false
;
var
jvmLoaded
=
false
;
var
jvmLoaded
=
false
;
downloadFile
(
commonUrl
,
"
commons.tar.gz
"
,
(
length
)
=>
{
downloadFile
(
commonUrl
,
"
commons
_git
.tar.gz
"
,
(
length
)
=>
{
commonsLength
=
+
length
;
commonsLength
=
+
length
;
initProgress
();
initProgress
();
},
(
progress
)
=>
{
},
(
progress
)
=>
{
...
@@ -177,7 +192,7 @@ function download_commons_and_jvm(cb){
...
@@ -177,7 +192,7 @@ function download_commons_and_jvm(cb){
// var jvmName = jvmUrl.substr(jvmUrl.lastIndexOf("/"+1, jvmUrl.length));
// var jvmName = jvmUrl.substr(jvmUrl.lastIndexOf("/"+1, jvmUrl.length));
// console.log(jvmName);
// console.log(jvmName);
// console.log(jvmUrl);
// console.log(jvmUrl);
downloadFile
(
jvmUrl
,
"
jvm.tar.gz
"
,
(
length
)
=>
{
downloadFile
(
jvmUrl
,
"
jvm
_git
.tar.gz
"
,
(
length
)
=>
{
jvmLenght
=
+
length
;
jvmLenght
=
+
length
;
initProgress
();
initProgress
();
},
(
progress
)
=>
{
},
(
progress
)
=>
{
...
@@ -205,7 +220,7 @@ function decompress_commons_and_jvm(cb){
...
@@ -205,7 +220,7 @@ function decompress_commons_and_jvm(cb){
var
commonUnziped
=
false
;
var
commonUnziped
=
false
;
var
jvmUnziped
=
false
;
var
jvmUnziped
=
false
;
targz
.
decompress
({
targz
.
decompress
({
src
:
'
o2server/commons.tar.gz
'
,
src
:
'
o2server/commons
_git
.tar.gz
'
,
dest
:
'
o2server
'
,
dest
:
'
o2server
'
,
tar
:
{
map
:
function
(
header
){
tar
:
{
map
:
function
(
header
){
count
++
;
count
++
;
...
@@ -222,7 +237,7 @@ function decompress_commons_and_jvm(cb){
...
@@ -222,7 +237,7 @@ function decompress_commons_and_jvm(cb){
}
}
});
});
targz
.
decompress
({
targz
.
decompress
({
src
:
'
o2server/jvm.tar.gz
'
,
src
:
'
o2server/jvm
_git
.tar.gz
'
,
dest
:
'
o2server
'
,
dest
:
'
o2server
'
,
tar
:
{
map
:
function
(
header
){
tar
:
{
map
:
function
(
header
){
count
++
;
count
++
;
...
@@ -245,6 +260,41 @@ function decompress_commons_and_jvm(cb){
...
@@ -245,6 +260,41 @@ function decompress_commons_and_jvm(cb){
cb
();
cb
();
});
});
}
}
function
move_commons
(){
console
.
log
(
`---------------------------------------------------------------------
. move commons files to o2server/commons ...
---------------------------------------------------------------------`
);
return
gulp
.
src
(
"
o2server/evn-o2server-commons-master-commons/commons/**/*
"
)
.
pipe
(
gulp
.
dest
(
"
o2server/commons/
"
));
}
function
move_jvm
(){
console
.
log
(
`---------------------------------------------------------------------
. move jvm files to o2server/jvm ...
---------------------------------------------------------------------`
);
var
path
;
if
(
options
.
ev
==
"
all
"
){
path
=
"
o2server/evn-o2server-jvm-master-jvm/jvm/**/*
"
}
else
{
path
=
"
o2server/evn-o2server-jvm-master-jvm-
"
+
options
.
ev
+
"
/jvm/**/*
"
}
return
gulp
.
src
(
path
)
.
pipe
(
gulp
.
dest
(
"
o2server/jvm/
"
));
}
function
clear_commons_git
(
cb
){
var
dest
=
[
'
o2server/evn-o2server-commons-master-commons/
'
,
'
o2server/commons_git.tar.gz
'
];
del
(
dest
,
{
force
:
true
});
cb
();
}
function
clear_jvm_git
(
cb
){
var
path
;
if
(
options
.
ev
==
"
all
"
){
path
=
"
o2server/evn-o2server-jvm-master-jvm/
"
}
else
{
path
=
"
o2server/evn-o2server-jvm-master-jvm-
"
+
options
.
ev
+
"
/
"
}
del
([
path
,
'
o2server/jvm_git.tar.gz
'
],
{
force
:
true
});
cb
();
}
function
build_web_minimize
(
cb
)
{
function
build_web_minimize
(
cb
)
{
console
.
log
(
`---------------------------------------------------------------------
console
.
log
(
`---------------------------------------------------------------------
...
@@ -351,7 +401,7 @@ function deploy_server(){
...
@@ -351,7 +401,7 @@ function deploy_server(){
}));
}));
}
}
exports
.
preperation
=
gulp
.
series
(
download_commons_and_jvm
,
decompress_commons_and_jvm
);
exports
.
preperation
=
gulp
.
series
(
download_commons_and_jvm
,
decompress_commons_and_jvm
,
move_commons
,
move_jvm
,
clear_commons_git
,
clear_jvm_git
);
var
shell
=
require
(
'
gulp-shell
'
)
var
shell
=
require
(
'
gulp-shell
'
)
exports
.
build_server
=
function
(){
exports
.
build_server
=
function
(){
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录