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 ceba689 commit 8a73879
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spug_api/tools/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
django.setup()

from django.conf import settings
import subprocess
import shutil
import sys
import os


if __name__ == '__main__':
version = sys.argv[1]
if version < 'v3.0.1-beta.8':
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目录迁移失败,请联系官方人员')

0 comments on commit 8a73879

Please sign in to comment.