【打包】 提取服务器、机器人相关参数
parent
67a744f904
commit
7455379911
|
|
@ -58,4 +58,4 @@ echo "Cleaning up temporary archive..."
|
|||
rm -rf $OUTPUT_DIRECTORY/$PROJECT_NAME.xcarchive
|
||||
|
||||
# The script is now complete.
|
||||
echo "Build process completed. IPA file is available at: $OUTPUT_DIRECTORY/YourProject.ipa"
|
||||
echo "Build process completed. IPA file is available at: $OUTPUT_DIRECTORY/$BUILD_NAME.ipa"
|
||||
|
|
|
|||
|
|
@ -8,3 +8,21 @@ APP_NAME="雪松"
|
|||
|
||||
# 项目名称
|
||||
PROJECT_NAME="ProjectNLD"
|
||||
|
||||
# 服务器管理员
|
||||
REMOTE_USER="root"
|
||||
|
||||
# 服务器地址
|
||||
REMOTE_HOST="132.232.113.98"
|
||||
|
||||
# 服务器上传资源路径
|
||||
REMOTE_UPLOAD_PATH="var/www/html/nld/Build"
|
||||
|
||||
# 内部机器人地址
|
||||
INNER_ROBOT="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3c92758c-1128-4931-ac8d-f19669d7befe"
|
||||
|
||||
# 外部机器人地址 - PHXH
|
||||
OUTER_ROBOT_PHXH="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=08abd6b7-67be-421b-8f9b-9bc1b2c71150"
|
||||
|
||||
# 外部机器人地址 - NLD委员会
|
||||
OUTER_ROBOT_NLD="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cc0e1316-dd10-4845-b067-5693f2385f66"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@ SHELL_DIR=$(dirname $0)
|
|||
echo "change dir to $SHELL_DIR"
|
||||
cd "$SHELL_DIR"
|
||||
|
||||
# 获取项目相关参数
|
||||
if [ -f ./project_env.sh ]; then
|
||||
source ./project_env.sh
|
||||
echo "found the project_env file"
|
||||
fi
|
||||
|
||||
# Check if exactly one arguments are provided
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <message>"
|
||||
|
|
@ -13,4 +19,4 @@ fi
|
|||
MSG_TEXT="$1"
|
||||
echo "$MSG_TEXT"
|
||||
|
||||
sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3c92758c-1128-4931-ac8d-f19669d7befe" "@all" "$MSG_TEXT"
|
||||
sh to_wechat_robot.sh "$INNER_ROBOT" "@all" "$MSG_TEXT"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@ SHELL_DIR=$(dirname $0)
|
|||
echo "change dir to $SHELL_DIR"
|
||||
cd "$SHELL_DIR"
|
||||
|
||||
# 获取项目相关参数
|
||||
if [ -f ./project_env.sh ]; then
|
||||
source ./project_env.sh
|
||||
echo "found the project_env file"
|
||||
fi
|
||||
|
||||
# Check if exactly one arguments are provided
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <message>"
|
||||
|
|
@ -14,6 +20,6 @@ MSG_TEXT="$1"
|
|||
echo "$MSG_TEXT"
|
||||
|
||||
# PHXH
|
||||
sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=08abd6b7-67be-421b-8f9b-9bc1b2c71150" "@all" "$MSG_TEXT"
|
||||
sh to_wechat_robot.sh "$OUTER_ROBOT_PHXH" "@all" "$MSG_TEXT"
|
||||
# NLD委员会
|
||||
sh to_wechat_robot.sh "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=cc0e1316-dd10-4845-b067-5693f2385f66" "@all" "$MSG_TEXT"
|
||||
sh to_wechat_robot.sh "$OUTER_ROBOT_NLD" "@all" "$MSG_TEXT"
|
||||
|
|
|
|||
|
|
@ -8,17 +8,13 @@ if [ -f ./project_env.sh ]; then
|
|||
echo "found the project_env file"
|
||||
fi
|
||||
|
||||
# Set remote server details (modify as needed)
|
||||
REMOTE_USER="root"
|
||||
REMOTE_HOST="132.232.113.98"
|
||||
|
||||
VERSION="$1"
|
||||
PLATFORM="$2"
|
||||
WORKSPACE="$3"
|
||||
|
||||
APK_NAME="$BUILD_NAME.apk"
|
||||
|
||||
REMOTE_PATH="/var/www/html/nld/Build/$WORKSPACE/$PLATFORM/$VERSION/"
|
||||
REMOTE_PATH="/$REMOTE_UPLOAD_PATH/$WORKSPACE/$PLATFORM/$VERSION/"
|
||||
echo "upload folder is: ${REMOTE_PATH}"
|
||||
|
||||
ssh "$REMOTE_USER@$REMOTE_HOST" "mkdir -p $REMOTE_PATH"
|
||||
|
|
|
|||
|
|
@ -8,15 +8,11 @@ if [ -f ./project_env.sh ]; then
|
|||
echo "found the project_env file"
|
||||
fi
|
||||
|
||||
# Set remote server details (modify as needed)
|
||||
REMOTE_USER="root"
|
||||
REMOTE_HOST="132.232.113.98"
|
||||
|
||||
VERSION="$1"
|
||||
PLATFORM="$2"
|
||||
WORKSPACE="$3"
|
||||
|
||||
REMOTE_PATH="/var/www/html/nld/Build/$WORKSPACE/$PLATFORM/$VERSION/"
|
||||
REMOTE_PATH="$REMOTE_UPLOAD_PATH/$WORKSPACE/$PLATFORM/$VERSION/"
|
||||
echo "upload folder is: ${REMOTE_PATH}"
|
||||
|
||||
IAP_NAME="$BUILD_NAME.ipa"
|
||||
|
|
|
|||
|
|
@ -20,19 +20,13 @@ PLATFORM="$2"
|
|||
WORKSPACE="$3"
|
||||
NEWASSETS="$4"
|
||||
|
||||
# Set remote server details (modify as needed)
|
||||
REMOTE_USER="root"
|
||||
REMOTE_HOST="132.232.113.98"
|
||||
REMOTE_PATH="/var/www/html/nld/Build/$WORKSPACE/$PLATFORM/$VERSION"
|
||||
REMOTE_PATH="/$REMOTE_UPLOAD_PATH/$WORKSPACE/$PLATFORM/$VERSION"
|
||||
|
||||
echo "remote path : $REMOTE_PATH"
|
||||
|
||||
# Set remote Build Path (local) (modify as needed)
|
||||
BUILD_PATH="../../$PROJECT_NAME/ServerData/$PLATFORM/"
|
||||
|
||||
# Set the URL where you want to send the message
|
||||
NOTE_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3c92758c-1128-4931-ac8d-f19669d7befe"
|
||||
|
||||
# Check if NEWASSETS is true, if so, delete existing assets on remote server
|
||||
#if [ "$NEWASSETS" = "true" ]; then
|
||||
# ssh "$REMOTE_USER@$REMOTE_HOST" "rm -rf $REMOTE_PATH/*"
|
||||
|
|
|
|||
Loading…
Reference in New Issue