|
|
@ -152,8 +152,8 @@ class GitDbUtil: |
|
|
|
# 从git中获取版本列表后和数据库对比,添加新的版本到数据库 |
|
|
|
# 从git中获取版本列表后和数据库对比,添加新的版本到数据库 |
|
|
|
def set_release_to_db(self): |
|
|
|
def set_release_to_db(self): |
|
|
|
local_repo = Repo(self.local_code_path) |
|
|
|
local_repo = Repo(self.local_code_path) |
|
|
|
local_repo.git.execute('git remote update origin --prune') # 更新远程列表 |
|
|
|
local_repo.git.execute(command='git remote update origin --prune', shell=True) # 更新远程列表 |
|
|
|
local_repo.git.execute('git fetch --all') |
|
|
|
local_repo.git.execute(command='git fetch --all', shell=True) |
|
|
|
release = [] |
|
|
|
release = [] |
|
|
|
for remote in local_repo.remotes: |
|
|
|
for remote in local_repo.remotes: |
|
|
|
for ref in remote.refs: |
|
|
|
for ref in remote.refs: |
|
|
|