提交 6791c90d 编写于 作者: S Shinwell Hu

add primitive support for gitee

上级 f8945cf4
......@@ -248,6 +248,20 @@ def check_gnome(info):
tags = clean_tags(tags, info)
return tags
def check_gitee(info):
resp = load_last_query_result(info)
repo_url = "https://gitee.com/" + info["src_repo"]
if resp == "":
resp = __check_git_helper(repo_url)
last_query = {}
last_query["time_stamp"] = datetime.now()
last_query["raw_data"] = resp
info["last_query"] = last_query
tags = __git_resp_to_tags(resp)
tags = clean_tags(tags, info)
return tags
def check_svn(info):
resp = load_last_query_result(info)
repo_url = info["src_repo"] + "/tags"
......
......@@ -72,6 +72,8 @@ def get_ver_tags(gt, repo, cwd_path=None):
tags = check_upstream.check_metacpan(pkg_info)
elif vc_type == "pypi":
tags = check_upstream.check_pypi(pkg_info)
elif vc_type == "gitee":
tags = check_upstream.check_gitee(pkg_info)
else:
print("Unsupport version control method {vc}".format(vc=vc_type))
return None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册