Commit 248ff07e by app.developer

修改和优化

parent 4f73ef84
...@@ -51,4 +51,4 @@ BUILD_NUMBER=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${WORKSPACE}/${ ...@@ -51,4 +51,4 @@ BUILD_NUMBER=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${WORKSPACE}/${
cp -r ${SCRIPT_PATH}/ipa_script ${WORKSPACE} cp -r ${SCRIPT_PATH}/ipa_script ${WORKSPACE}
cp -r ${WORKSPACE}/${IOS_SCHEME}/Config/Config-${BUILD_ENV}.plist ${WORKSPACE}/${IOS_SCHEME}/Config/Config.plist cp -r ${WORKSPACE}/${IOS_SCHEME}/Config/Config-${BUILD_ENV}.plist ${WORKSPACE}/${IOS_SCHEME}/Config/Config.plist
sh ${WORKSPACE}/ipa_script/auto_package_ipa.sh ${BUILD_ENV} ${BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY} ${DD_HOST_URL} ${DD_ICON_URL} ${DD_DOWN_URL} ${DD_MESSAGE} sh ${WORKSPACE}/ipa_script/auto_package_ipa.sh ${BUILD_ENV} ${BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY} ${DD_HOST_URL} ${DD_MESSAGE}
...@@ -50,9 +50,7 @@ readonly EBIZ_EXPORT_METHOD="development" # demo 项目没有 app id,打包方 ...@@ -50,9 +50,7 @@ readonly EBIZ_EXPORT_METHOD="development" # demo 项目没有 app id,打包方
readonly PGY_API_KEY=$3 readonly PGY_API_KEY=$3
readonly PGY_USER_KEY=$4 readonly PGY_USER_KEY=$4
readonly DD_HOST_URL=$5 readonly DD_HOST_URL=$5
readonly DD_ICON_URL=$6 readonly DD_MESSAGE=$6
readonly DD_DOWN_URL=$7
readonly DD_MESSAGE=$8
function echo_log() { function echo_log() {
echo "${COLOR_Cyan}$1${COLOR_Default}" echo "${COLOR_Cyan}$1${COLOR_Default}"
...@@ -111,7 +109,7 @@ echo "===== 包路径:${EBIZ_IPA_PATH} =====" ...@@ -111,7 +109,7 @@ echo "===== 包路径:${EBIZ_IPA_PATH} ====="
# 上传到蒲公英 (以上调试完成后,再打开以下注释) # 上传到蒲公英 (以上调试完成后,再打开以下注释)
if [ "yes" == "$DD_MESSAGE" ]; then if [ "yes" == "$DD_MESSAGE" ]; then
sh ${PROJECT_DIR}/ipa_script/auto_upload_pgy.sh ${EBIZ_IPA_PATH} ${EBIZ_BUILD_ENV} ${EBIZ_BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY} ${DD_HOST_URL} ${DD_ICON_URL} ${DD_DOWN_URL} sh ${PROJECT_DIR}/ipa_script/auto_upload_pgy.sh ${EBIZ_IPA_PATH} ${EBIZ_BUILD_ENV} ${EBIZ_BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY} ${DD_HOST_URL}
else else
sh ${PROJECT_DIR}/ipa_script/auto_upload_pgy.sh ${EBIZ_IPA_PATH} ${EBIZ_BUILD_ENV} ${EBIZ_BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY} sh ${PROJECT_DIR}/ipa_script/auto_upload_pgy.sh ${EBIZ_IPA_PATH} ${EBIZ_BUILD_ENV} ${EBIZ_BUILD_NUMBER} ${PGY_API_KEY} ${PGY_USER_KEY}
fi fi
......
...@@ -50,8 +50,6 @@ fi ...@@ -50,8 +50,6 @@ fi
readonly PGY_API_KEY=$4 readonly PGY_API_KEY=$4
readonly PGY_USER_KEY=$5 readonly PGY_USER_KEY=$5
readonly DD_HOST_URL=$6 readonly DD_HOST_URL=$6
readonly DD_ICON_URL=$7
readonly DD_DOWN_URL=$8
readonly PGY_UPLOAD_SERVER="https://qiniu-storage.pgyer.com/apiv1/app/upload" readonly PGY_UPLOAD_SERVER="https://qiniu-storage.pgyer.com/apiv1/app/upload"
...@@ -63,8 +61,14 @@ readonly PGY_upload_log="${EBIZ_ENV}_${NOW}" ...@@ -63,8 +61,14 @@ readonly PGY_upload_log="${EBIZ_ENV}_${NOW}"
# 上传到蒲公英,并接收 Response # 上传到蒲公英,并接收 Response
PGY_RESPONSE=`curl -F "file=@/${EBIZ_IPA_PATH}" -F "uKey=${PGY_USER_KEY}" -F "_api_key=${PGY_API_KEY}" -F installType=2 -F password="${PGY_password}" -F "updateDescription=${PGY_upload_log}" ${PGY_UPLOAD_SERVER}` PGY_RESPONSE=`curl -F "file=@/${EBIZ_IPA_PATH}" -F "uKey=${PGY_USER_KEY}" -F "_api_key=${PGY_API_KEY}" -F installType=2 -F password="${PGY_password}" -F "updateDescription=${PGY_upload_log}" ${PGY_UPLOAD_SERVER}`
echo $PGY_RESPONSE
if [ "$?" -ne "0" ]; then RESPONSE_CODE=$(echo $PGY_RESPONSE | jq .code)
DD_ICON_URL=$(echo $PGY_RESPONSE | jq .data.appIcon)/120
DD_DOWN_URL=$(echo $PGY_RESPONSE | jq .data.appShortcutUrl)
if [ $RESPONSE_CODE -eq 0 ]; then
else
echo_error "upload error" echo_error "upload error"
exit 1 exit 1
fi fi
...@@ -81,8 +85,8 @@ echo_log ${PGY_password} ...@@ -81,8 +85,8 @@ echo_log ${PGY_password}
# (以上调试完成后,再打开以下注释) # (以上调试完成后,再打开以下注释)
if [ $# -eq 8 ]; then if [ $# -eq 6 ]; then
python ${CURRENT_DIR}/auto_push_ding_talk.py ${EBIZ_Version} ${EBIZ_APP_Name} ${EBIZ_ENV} ${DD_ICON_URL} ${DD_DOWN_URL} ${DD_HOST_URL} ${PGY_password} python ${CURRENT_DIR}/auto_push_ding_talk.py ${EBIZ_Version} ${EBIZ_APP_Name} ${EBIZ_ENV} ${DD_ICON_URL//\"/} ${DD_DOWN_URL//\"/} ${DD_HOST_URL} ${PGY_password}
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment