Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
9436828c
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
30
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9436828c
编写于
8月 07, 2020
作者:
L
Leo Fang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
auto-checkout target branch in local repo
Signed-off-by:
N
Leo Fang
<
leofang_94@163.com
>
上级
630c5568
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
4 deletion
+5
-4
advisors/simple-update-robot.py
advisors/simple-update-robot.py
+5
-4
未找到文件。
advisors/simple-update-robot.py
浏览文件 @
9436828c
...
...
@@ -80,7 +80,7 @@ def update_check(spec, o_ver, n_ver):
return
False
def
fork_clone_repo
(
gt
,
repo
):
def
fork_clone_repo
(
gt
,
repo
,
br
):
"""
Fork repo from src-openEuler to private repository, then clone it to local
"""
...
...
@@ -90,6 +90,7 @@ def fork_clone_repo(gt, repo):
name
=
gt
.
token
[
"user"
]
subprocess
.
call
([
"git"
,
"clone"
,
"git@gitee.com:{user}/{pkg}"
.
format
(
user
=
name
,
pkg
=
repo
)])
os
.
chdir
(
repo
)
subprocess
.
call
([
"git"
,
"checkout"
,
"{branch}"
.
format
(
branch
=
br
)])
def
download_src
(
gt
,
spec
,
o_ver
,
n_ver
):
...
...
@@ -169,7 +170,7 @@ def auto_update_pkg(gt, u_branch, u_pkg):
print
(
"Only support master and LTS version upgrade."
)
sys
.
exit
(
1
)
fork_clone_repo
(
gt
,
u_pkg
)
fork_clone_repo
(
gt
,
u_pkg
,
u_branch
)
if
not
update_check
(
pkg_spec
,
pkg_ver
,
rec_up_ver
):
sys
.
exit
(
1
)
...
...
@@ -214,7 +215,7 @@ def auto_update_repo(gt, u_branch, u_repo):
print
(
"Only support master and LTS version upgrade."
)
sys
.
exit
(
1
)
fork_clone_repo
(
gt
,
pkg_name
)
fork_clone_repo
(
gt
,
pkg_name
,
u_branch
)
if
not
update_check
(
pkg_spec
,
pkg_ver
,
rec_up_ver
):
continue
...
...
@@ -255,7 +256,7 @@ if __name__ == "__main__":
cur_version
=
replace_macros
(
spec_file
.
version
,
spec_file
)
if
args
.
fork_then_clone
:
fork_clone_repo
(
user_gitee
,
args
.
repo_pkg
)
fork_clone_repo
(
user_gitee
,
args
.
repo_pkg
,
args
.
branch
)
if
args
.
download
or
args
.
create_spec
:
if
not
args
.
new_version
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录