Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
82b0f0d1
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
82b0f0d1
编写于
12月 22, 2020
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
restart after upgrade
上级
3758a8c9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
17 deletion
+40
-17
Makefile
Makefile
+5
-2
conf/ztf.conf
conf/ztf.conf
+8
-9
res/messages_en.json
res/messages_en.json
+6
-2
res/messages_zh.json
res/messages_zh.json
+4
-0
src/server/cron/cron.go
src/server/cron/cron.go
+1
-1
src/server/service/heartbeat.go
src/server/service/heartbeat.go
+2
-2
src/server/service/upgrade.go
src/server/service/upgrade.go
+4
-0
src/utils/common/utils.go
src/utils/common/utils.go
+10
-1
未找到文件。
Makefile
浏览文件 @
82b0f0d1
VERSION
=
2.
3
VERSION
=
2.
7
PROJECT
=
ztf
QINIU_DIR
=
/Users/aaron/work/zentao/qiniu/
QINIU_DIST_DIR
=
${QINIU_DIR}${PROJECT}
/
${VERSION}
/
...
...
@@ -69,4 +69,7 @@ upload_to:
@
echo
'upload...'
@
find
${QINIU_DIR}
-name
".DS_Store"
-type
f
-delete
@
qshell qupload2
--src-dir
=
${QINIU_DIR}
--bucket
=
download
--thread-count
=
10
--log-file
=
qshell.log
\
--skip-path-prefixes
=
zendata
--rescan-local
--overwrite
--skip-path-prefixes
=
zendata
--rescan-local
@
qshell qupload2
--src-dir
=
${QINIU_DIR}
--bucket
=
download
--thread-count
=
10
--log-file
=
qshell.log
\
--file-list
=
${PROJECT}
/version.txt
--rescan-local
--overwrite
conf/ztf.conf
浏览文件 @
82b0f0d1
Version
=
2
.
3
Version
=
2
.
7
Language
=
zh
Url
=
http
://
zentaopms
.
ngtesting
.
com
/
Account
=
admin
Password
=
P2ssw0rd
Javascript
=
Lua
=
Perl
=
Javascript
=
Lua
=
Perl
=
Php
=
C
:\
dev
\
sdk
\
php
-
7
.
3
.
9
-
Win32
-
VC15
-
x64
\
php
.
exe
Python
=
Ruby
=
Tcl
=
Autoit
=
Python
=
Ruby
=
Tcl
=
Autoit
=
res/messages_en.json
浏览文件 @
82b0f0d1
...
...
@@ -456,11 +456,11 @@
},
{
"id"
:
"success_upgrade"
,
"translation"
:
"Successfully
to updat
e from version %.1f to %s."
"translation"
:
"Successfully
upgrad
e from version %.1f to %s."
},
{
"id"
:
"fail_upgrade"
,
"translation"
:
"Fail to up
dat
e from version %.1f to %s., err: %s."
"translation"
:
"Fail to up
grad
e from version %.1f to %s., err: %s."
},
{
...
...
@@ -486,6 +486,10 @@
{
"id"
:
"perm_deny"
,
"translation"
:
"Permission denied to file %s, please change work dir."
},
{
"id"
:
"fail_unzip"
,
"translation"
:
"Fail to unzip file %s."
}
]
}
res/messages_zh.json
浏览文件 @
82b0f0d1
...
...
@@ -493,6 +493,10 @@
{
"id"
:
"perm_deny"
,
"translation"
:
"文件%s权限不足,建议切换工作目录。"
},
{
"id"
:
"fail_unzip"
,
"translation"
:
"解压文件%s失败。"
}
]
}
src/server/cron/cron.go
浏览文件 @
82b0f0d1
...
...
@@ -32,7 +32,7 @@ func (s *CronService) Init() {
)
cronUtils
.
AddTaskFuc
(
"CheckUp
grad
e"
,
"CheckUp
dat
e"
,
fmt
.
Sprintf
(
"@every %ds"
,
serverConst
.
CheckUpgradeInterval
),
func
()
{
if
s
.
taskService
.
CheckRunning
()
{
// ignore if task is running
...
...
src/server/service/heartbeat.go
浏览文件 @
82b0f0d1
...
...
@@ -2,7 +2,7 @@ package service
import
(
serverModel
"github.com/easysoft/zentaoatf/src/server/domain"
commonUtils
"github.com/easysoft/zentaoatf/src/server/utils/common"
"github.com/easysoft/zentaoatf/src/server/utils/common"
serverConst
"github.com/easysoft/zentaoatf/src/server/utils/const"
"github.com/easysoft/zentaoatf/src/service/client"
zentaoService
"github.com/easysoft/zentaoatf/src/service/zentao"
...
...
@@ -25,7 +25,7 @@ func NewHeartBeatService() *HeartBeatService {
func
(
s
*
HeartBeatService
)
HeartBeat
(
isBusy
bool
)
{
if
sysInfo
.
OsName
==
""
{
sysInfo
=
common
Utils
.
GetSysInfo
()
sysInfo
=
server
Utils
.
GetSysInfo
()
}
// send request
...
...
src/server/service/upgrade.go
浏览文件 @
82b0f0d1
...
...
@@ -62,6 +62,10 @@ func (s *UpgradeService) DownloadVersion(version string) (err error) {
fileUtils
.
RmDir
(
dir
)
fileUtils
.
MkDirIfNeeded
(
dir
)
err
=
archiver
.
Unarchive
(
pth
,
dir
)
if
err
!=
nil
{
logUtils
.
PrintToWithColor
(
i118Utils
.
I118Prt
.
Sprintf
(
"fail_unzip"
,
pth
),
color
.
FgCyan
)
}
}
return
...
...
src/utils/common/utils.go
浏览文件 @
82b0f0d1
...
...
@@ -6,6 +6,7 @@ import (
"github.com/easysoft/zentaoatf/src/utils/const"
stringUtils
"github.com/easysoft/zentaoatf/src/utils/string"
"github.com/emirpasic/gods/maps"
"log"
"net"
"os"
"os/exec"
...
...
@@ -196,8 +197,16 @@ func getIpType(IP net.IP) string {
func
Restart
()
error
{
name
,
err
:=
osext
.
Executable
()
log
.
Println
(
"Try to restart "
+
name
)
if
err
!=
nil
{
log
.
Println
(
"Restart error 1 "
+
err
.
Error
())
return
err
}
return
exec
.
Command
(
name
,
os
.
Args
[
1
:
]
...
)
.
Start
()
err
=
exec
.
Command
(
name
,
os
.
Args
[
1
:
]
...
)
.
Start
()
if
err
!=
nil
{
log
.
Println
(
"Restart error 2 "
+
err
.
Error
())
}
return
err
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录