Skip to content

Commit

Permalink
fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vapao committed Sep 6, 2021
1 parent 8a73879 commit 7b76bd4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions spug_api/tools/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
if __name__ == '__main__':
version = sys.argv[1]
if version <= 'v3.0.1-beta.8':
print('执行 v3.0.1-beta.8 repos目录迁移')
old_path = os.path.join(settings.BASE_DIR, 'repos')
new_path = os.path.join(settings.REPOS_DIR)
shutil.move(old_path, new_path)
task = subprocess.Popen(f'cd {settings.BASE_DIR} && git checkout -- repos', shell=True)
if task.wait() != 0:
print('repos目录迁移失败,请联系官方人员')
if not os.path.exists(new_path):
print('执行 v3.0.1-beta.8 repos目录迁移')
shutil.move(old_path, new_path)
task = subprocess.Popen(f'cd {settings.BASE_DIR} && git checkout -- repos', shell=True)
if task.wait() != 0:
print('repos目录迁移失败,请联系官方人员')

0 comments on commit 7b76bd4

Please sign in to comment.