Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
5139efad
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
11 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
5139efad
编写于
8月 28, 2019
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
config global params if not init when checkout test cases
上级
cb112169
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
10 deletion
+8
-10
src/action/gen.go
src/action/gen.go
+6
-0
src/utils/config/config.go
src/utils/config/config.go
+2
-10
未找到文件。
src/action/gen.go
浏览文件 @
5139efad
...
...
@@ -15,6 +15,12 @@ func GenerateScript(productId string, moduleId string, suiteId string, taskId st
config
:=
configUtils
.
ReadCurrConfig
()
if
config
.
Url
==
""
||
config
.
Account
==
""
||
config
.
Password
==
""
{
configUtils
.
ConfigForSet
()
}
if
(
productId
!=
""
)
||
(
moduleId
!=
""
&&
productId
!=
""
)
||
suiteId
!=
""
||
taskId
!=
""
{
}
else
{
configUtils
.
ConfigForCheckout
(
&
productId
,
&
moduleId
,
&
suiteId
,
&
taskId
,
&
independentFile
,
&
scriptLang
)
}
...
...
src/utils/config/config.go
浏览文件 @
5139efad
...
...
@@ -52,7 +52,7 @@ func ConfigForSet() {
language
=
"zh"
}
else
{
if
language
==
""
{
fmt
.
Print
(
languageDefault
)
fmt
.
Print
(
"English"
)
}
language
=
languageDefault
}
...
...
@@ -77,12 +77,6 @@ func ConfigForSet() {
func
ConfigForCheckout
(
productId
*
string
,
moduleId
*
string
,
suiteId
*
string
,
taskId
*
string
,
independentFile
*
bool
,
scriptLang
*
string
)
{
color
.
Cyan
(
"
\n
"
+
i118Utils
.
I118Prt
.
Sprintf
(
"need_config"
))
url
:=
getInput
(
"http://.*"
,
"enter_url"
)
account
:=
getInput
(
".{3,}"
,
"enter_account"
)
password
:=
getInput
(
".{4,}"
,
"enter_password"
)
coType
:=
getInput
(
"(product|module|suite|task|p|m|s|t)"
,
"enter_co_type"
)
coType
=
strings
.
ToLower
(
coType
)
...
...
@@ -99,7 +93,7 @@ func ConfigForCheckout(productId *string, moduleId *string, suiteId *string, tas
indep
:=
getInput
(
"(yes|no|y|n|)"
,
"enter_co_independent"
)
indep
=
strings
.
ToLower
(
indep
)
if
indep
!=
"yes"
&&
indep
!=
"y"
{
// default no
if
indep
==
"yes"
&&
indep
==
"y"
{
*
independentFile
=
true
}
else
{
if
indep
==
""
{
...
...
@@ -112,8 +106,6 @@ func ConfigForCheckout(productId *string, moduleId *string, suiteId *string, tas
fmtParam
:=
strings
.
Join
(
langUtils
.
GetSupportLangageArr
(),
" / "
)
*
scriptLang
=
getInput
(
regx
,
"enter_co_language"
,
fmtParam
)
SaveConfig
(
"en"
,
url
,
account
,
password
)
PrintCurrConfig
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录