This commit is contained in:
Aether
2025-10-14 14:38:46 +08:00
parent fb958bc065
commit c5ad929f5a

18
sync.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
rsync -avz \
--exclude='.git' \
--exclude='.env' \
--exclude='runtime' \
--delete \
/home/aether/work/hyperf_data/ \
root@192.168.28.199:/www/wwwroot/dhd_hyperf/hyperf_data/
# 执行成功后提示
if [ $? -eq 0 ]; then
echo "------------------------"
echo "同步完成!代码已部署到服务器"
else
echo "------------------------"
echo "同步失败,请检查错误信息"
fi