From effc93b56d060da5e2b7395b87090f9a42e976ad Mon Sep 17 00:00:00 2001 From: Ching Date: Sat, 22 Jan 2022 21:34:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(dodo):=20=E5=A2=9E=E5=8A=A0=E9=A3=9E?= =?UTF-8?q?=E4=B9=A6=20dodo=20=E9=83=A8=E7=BD=B2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加飞书 dodo 部署逻辑 Signed-off-by: Ching --- .vscode/settings.json | 4 +++- develop_requirements.txt | 1 + scripts/dodo.py | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 6b8fa15..a07a049 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,5 +9,7 @@ "editor.formatOnSave": true, "editor.rulers": [ 120 - ] + ], + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": "active" } diff --git a/develop_requirements.txt b/develop_requirements.txt index 89452a9..c71d62c 100644 --- a/develop_requirements.txt +++ b/develop_requirements.txt @@ -31,3 +31,4 @@ user-agents==2.2.0 wcwidth==0.2.5 zipp==3.5.0 redis==4.1.0 +black diff --git a/scripts/dodo.py b/scripts/dodo.py index b3628a5..13eb0cf 100644 --- a/scripts/dodo.py +++ b/scripts/dodo.py @@ -224,6 +224,11 @@ class RequestHandler(BaseHTTPRequestHandler): subprocess.call("/root/deploy/dsite_prepare.sh") subprocess.run(["supervisorctl", "restart", "dsite"]) self.msg_compoment(access_token, open_id, '🎉 %s 部署成功 🎉' % site_) + if site_ == 'dodo': + self.msg_compoment(access_token, open_id, '🚧 %s 开始部署 🚧' % site_) + subprocess.run(["git", "pull"]) + subprocess.run(["supervisorctl", "restart", "dodo"]) + self.msg_compoment(access_token, open_id, '🎉 %s 部署成功 🎉' % site_) else: self.msg_compoment(access_token, open_id, '⚠️ %s 不存在 ⚠️' % site_) elif orig_text.startswith('/菜谱 '):