mirror of https://github.com/openspug/spug
F 修复macOS主机发布报错的问题2
parent
2f59137d10
commit
480c85e305
|
@ -10,7 +10,6 @@ import socket
|
||||||
import subprocess
|
import subprocess
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
REPOS_DIR = settings.REPOS_DIR
|
REPOS_DIR = settings.REPOS_DIR
|
||||||
|
@ -149,12 +148,7 @@ def _deploy_ext1_host(helper, h_id, extend, env):
|
||||||
|
|
||||||
# do deploy
|
# do deploy
|
||||||
helper.send_step(h_id, 3, f'{human_time()} 执行发布... ')
|
helper.send_step(h_id, 3, f'{human_time()} 执行发布... ')
|
||||||
tmp_path = os.path.join(extend.dst_repo, f'tmp_{env.SPUG_VERSION}')
|
helper.remote(host.id, ssh, f'rm -f {extend.dst_dir} && ln -sfn {repo_dir} {extend.dst_dir}')
|
||||||
if sys.platform == 'darwin':
|
|
||||||
command = f'rm -f {extend.dst_dir} && ln -sfn {repo_dir} {extend.dst_dir}'
|
|
||||||
else:
|
|
||||||
command = f'ln -sfn {repo_dir} {tmp_path} && mv -fT {tmp_path} {extend.dst_dir}'
|
|
||||||
helper.remote(host.id, ssh, command)
|
|
||||||
helper.send_step(h_id, 3, '完成\r\n')
|
helper.send_step(h_id, 3, '完成\r\n')
|
||||||
|
|
||||||
# post host
|
# post host
|
||||||
|
|
Loading…
Reference in New Issue