mirror of https://github.com/openspug/spug
parent
8a73879ca5
commit
7b76bd443d
|
@ -18,10 +18,11 @@ import os
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
version = sys.argv[1]
|
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')
|
old_path = os.path.join(settings.BASE_DIR, 'repos')
|
||||||
new_path = os.path.join(settings.REPOS_DIR)
|
new_path = os.path.join(settings.REPOS_DIR)
|
||||||
shutil.move(old_path, new_path)
|
if not os.path.exists(new_path):
|
||||||
task = subprocess.Popen(f'cd {settings.BASE_DIR} && git checkout -- repos', shell=True)
|
print('执行 v3.0.1-beta.8 repos目录迁移')
|
||||||
if task.wait() != 0:
|
shutil.move(old_path, new_path)
|
||||||
print('repos目录迁移失败,请联系官方人员')
|
task = subprocess.Popen(f'cd {settings.BASE_DIR} && git checkout -- repos', shell=True)
|
||||||
|
if task.wait() != 0:
|
||||||
|
print('repos目录迁移失败,请联系官方人员')
|
||||||
|
|
Loading…
Reference in New Issue