From 2f8b0918e69ff283ee3ed19162fc4aa74e8a69a7 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 7 Nov 2026 11:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/deploy_prod.sh | 33 ++++++++------------------------- app/deploy_test.sh | 11 ----------- web/deploy_prod.sh | 33 ++++++++------------------------- web/deploy_test.sh | 11 ----------- 4 files changed, 16 insertions(+), 72 deletions(-) delete mode 100755 app/deploy_test.sh delete mode 100755 web/deploy_test.sh diff --git a/app/deploy_prod.sh b/app/deploy_prod.sh index 09ed892..5370f2c 100755 --- a/app/deploy_prod.sh +++ b/app/deploy_prod.sh @@ -1,28 +1,11 @@ #!/bin/bash -FILE_NAME="web_mdcom_app" -REMOTE_FILE_PATH="/home/server2/web_mdcom/app/" -TAG_NAME="web_mdcom_app.tar.gz" +echo "开始" +rm -rf ./web_hga_app ./web_hga_app.tar.gz +GOOS=linux GOARCH=amd64 go build -o web_hga_app +tar zvcf web_hga_app.tar.gz web_hga_app -set -e -set -o -function send_msg() { - msg="@jscdsndj @xiuyuan_Lee @steven0yu %0A服务:SERVER2  站点-91spz.com管理服务APP%0A更新内容:$content%0A创建时间: $(date +%F_%X)%0A操作人:$(git config user.name)" - curl -X POST "https://api.telegram.org/bot6357085965:AAEmXfjZnZwnDTicL7Wjbd7cXvYv_G98w8A/sendMessage" -d "chat_id=$1&text=$msg" >/dev/null 2>&1 -} -read -p "输入yes, 开始上传: " word -if [[ ! "yes" =~ $word ]]; then - echo "终止" -else - read -e -p "本次更新内容(输入q退出编辑): " -r content - echo "开始" - rm -rf ./$FILE_NAME ./$TAG_NAME ./yinsemd5.txt - GOOS=linux GOARCH=amd64 go build -o $FILE_NAME - md5sum $FILE_NAME | cut -d ' ' -f1 >yinsemd5.txt - tar zvcf $TAG_NAME ./$FILE_NAME yinsemd5.txt - md5sum $TAG_NAME | cut -d ' ' -f1 >yinsemd5.txt - scp -i ~/.ssh/id_rsa -P 22889 ./yinsemd5.txt server2@116.212.120.2:$REMOTE_FILE_PATH - scp -i ~/.ssh/id_rsa -P 22889 ./$TAG_NAME server2@116.212.120.2:$REMOTE_FILE_PATH - send_msg -4791758991 #服务器小组 -fi -rm -rf ./$FILE_NAME ./$TAG_NAME ./yinsemd5.txt \ No newline at end of file +scp web_hga_app.tar.gz root@172.104.166.87:/data/uzip +ssh root@172.104.166.87 "/server/web_hga/app/up_app.sh" + +rm -rf ./web_hga_app ./web_hga_app.tar.gz \ No newline at end of file diff --git a/app/deploy_test.sh b/app/deploy_test.sh deleted file mode 100755 index 80d3c94..0000000 --- a/app/deploy_test.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -sudo make test - -scp -P 22889 web_91av_app.tar.gz root@172.104.181.99:/server/web_91av/app/ -ssh root@172.104.181.99 -p 22889 "cd /server/web_91av/app/ && /bin/tar -xf /server/web_91av/app/web_91av_app.tar.gz && /usr/bin/supervisorctl restart web_91av_app" -if [ $? -eq 0 ];then - echo -e "\033[32m 91spz.com H5更新成功 \033[0m" -else - echo -e "\033[31m 91spz.com H5更新失败 \033[0m" -fi -rm -f web_91av_app.tar.gz diff --git a/web/deploy_prod.sh b/web/deploy_prod.sh index 9794f2f..d2ee939 100755 --- a/web/deploy_prod.sh +++ b/web/deploy_prod.sh @@ -1,28 +1,11 @@ #!/bin/bash -FILE_NAME="web_mdcom_web" -REMOTE_FILE_PATH="/home/server2/web_mdcom/web/" -TAG_NAME="web_mdcom_web.tar.gz" +echo "开始" +rm -rf ./web_hga_web ./web_hga_web.tar.gz +GOOS=linux GOARCH=amd64 go build -o web_hga_web +tar zvcf web_hga_web.tar.gz web_hga_web -set -e -set -o -function send_msg() { - msg="@jscdsndj @xiuyuan_Lee @steven0yu %0A服务:SERVER2  站点-91spz.com管理服务(WEB)%0A更新内容:$content%0A创建时间: $(date +%F_%X)%0A操作人:$(git config user.name)" - curl -X POST "https://api.telegram.org/bot6357085965:AAEmXfjZnZwnDTicL7Wjbd7cXvYv_G98w8A/sendMessage" -d "chat_id=$1&text=$msg" >/dev/null 2>&1 -} -read -p "输入yes, 开始上传: " word -if [[ ! "yes" =~ $word ]]; then - echo "终止" -else - read -e -p "本次更新内容(输入q退出编辑): " -r content - echo "开始" - rm -rf ./$FILE_NAME ./$TAG_NAME ./yinsemd5.txt - GOOS=linux GOARCH=amd64 go build -o $FILE_NAME - md5sum $FILE_NAME | cut -d ' ' -f1 >yinsemd5.txt - tar zvcf $TAG_NAME ./$FILE_NAME yinsemd5.txt - md5sum $TAG_NAME | cut -d ' ' -f1 >yinsemd5.txt - scp -i ~/.ssh/id_rsa -P 22889 ./yinsemd5.txt server2@116.212.120.2:$REMOTE_FILE_PATH - scp -i ~/.ssh/id_rsa -P 22889 ./$TAG_NAME server2@116.212.120.2:$REMOTE_FILE_PATH - send_msg -4791758991 #服务器小组 -fi -rm -rf ./$FILE_NAME ./$TAG_NAME ./yinsemd5.txt \ No newline at end of file +scp web_hga_web.tar.gz root@172.104.166.87:/data/uzip +ssh root@172.104.166.87 "/server/web_hga/web/up_app.sh" + +rm -rf ./web_hga_web ./web_hga_web.tar.gz \ No newline at end of file diff --git a/web/deploy_test.sh b/web/deploy_test.sh deleted file mode 100755 index 1342b70..0000000 --- a/web/deploy_test.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -sudo make test - -scp -P 22889 web_91av_web.tar.gz root@172.104.181.99:/server/web_91av/web/ -ssh root@172.104.181.99 -p 22889 "cd /server/web_91av/web/ && /bin/tar -xf /server/web_91av/web/web_91av_web.tar.gz && /usr/bin/supervisorctl restart web_91av_web" -if [ $? -eq 0 ];then - echo -e "\033[32m 91spz.com web更新成功 \033[0m" -else - echo -e "\033[31m 91spz.com web更新失败 \033[0m" -fi -rm -f web_91av_web.tar.gz