修正 update

This commit is contained in:
2024-11-06 02:49:54 +08:00
parent 4eb3857ac9
commit 7da1c994e9

View File

@@ -1,3 +1,5 @@
export host=main
# 运行本地开发环境(使用SSH隧道代理端口)
dev:
@if ! go list -m github.com/air-verse/air@latest >/dev/null 2>&1; then \
@@ -19,12 +21,11 @@ build:
# 更新部署到服务器
update: build
host=main
ssh $host "mv ~/webp/main ~/webp/main_old"
scp dist/main $host:~/webp/main
ssh $(host) "mv ~/webp/main ~/webp/main_old"
scp dist/main $(host):~/webp/main
rm -rf dist
ssh $host "systemctl restart webp"
ssh $host "rm ~/webp/main_old"
ssh $(host) "systemctl restart webp"
ssh $(host) "rm ~/webp/main_old"
# 设为系统服务和设置日志轮转
service: