Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
39aff2e8
B
Build Lite
项目概览
OpenHarmony
/
Build Lite
10 个月 前同步成功
通知
22
Star
24
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Build Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
39aff2e8
编写于
6月 07, 2021
作者:
Y
yangming_ha
提交者:
Gitee
6月 07, 2021
浏览文件
操作
浏览文件
下载
差异文件
!5 hb trransfer time parameters to gn args
Merge pull request !5 from pilipala195/N/A
上级
5bdd8117
31411681
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
0 deletion
+13
-0
hb/build/build.py
hb/build/build.py
+5
-0
hb/common/utils.py
hb/common/utils.py
+8
-0
未找到文件。
hb/build/build.py
浏览文件 @
39aff2e8
...
...
@@ -20,6 +20,7 @@ from collections import defaultdict
from
hb.build.build_process
import
Build
from
hb.set.set
import
set_product
from
hb.common.utils
import
get_current_time
def
add_options
(
parser
):
...
...
@@ -59,6 +60,10 @@ def exec_command(args):
cmd_args
=
defaultdict
(
list
)
build
.
register_args
(
'ohos_build_type'
,
args
.
build_type
[
0
])
# Get the compilation time in timestamp and human readable format
build
.
register_args
(
'ohos_build_time'
,
get_current_time
(
type
=
'timestamp'
))
build
.
register_args
(
'ohos_build_datetime'
,
get_current_time
(
type
=
'datetime'
))
if
args
.
test
is
not
None
:
build
.
test
=
args
.
test
...
...
hb/common/utils.py
浏览文件 @
39aff2e8
...
...
@@ -24,6 +24,7 @@ import sys
import
json
from
collections
import
namedtuple
import
yaml
from
datetime
import
datetime
def
encode
(
data
,
encoding
=
'utf-8'
):
...
...
@@ -190,6 +191,13 @@ def args_factory(args_dict):
return
args
def
get_current_time
(
type
=
'timestamp'
):
if
type
==
'timestamp'
:
return
int
(
datetime
.
utcnow
().
timestamp
()
*
1000
)
if
type
==
'datetime'
:
return
datetime
.
now
().
strftime
(
'%Y-%m-%d %H:%M:%S'
)
def
hb_info
(
msg
):
level
=
'info'
for
line
in
str
(
msg
).
splitlines
():
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录