mirror of https://github.com/openspug/spug
parent
8a73879ca5
commit
7b76bd443d
|
@ -18,10 +18,11 @@ import os
|
|||
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目录迁移失败,请联系官方人员')
|
||||
|
|
Loading…
Reference in New Issue