This action will force synchronization from turnon/java-tutorial, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
################################################################################## javatool-server 发布脚本################################################################################### 检查脚本参数,如必要参数未传入,退出脚本。#checkInput() {if [ "${branch}" == "" ] || [ "${profile}" == "" ]; thenecho "请输入脚本参数:branch profile"echo " branch: git分支(必填)。如 develop, master"echo " profile: 运行环境(必填)。可选值:development/test"echo "例:./javatool-server-release.sh master test"exit 0fi}## 检查文件是否存在,不存在则退出脚本#checkFileExist() {if [ ! -f "1ドル" ]; thenecho "关键文件 1ドル 找不到,脚本执行结束"exit 0fi}## 检查目录是否存在,不存在则退出脚本#checkFolderExist() {if [ ! -d "1ドル" ]; thenecho "关键目录 1ドル 找不到,脚本执行结束"exit 0fi}## 记录发布的版本信息#saveVersionInfo() {VERSION_LOG_PATH=/home/zp/log/deploy/version.txtif [ ! -f ${VERSION_LOG_PATH} ]; thenmkdir -p /home/zp/log/deploytouch ${VERSION_LOG_PATH}fichmod 777 ${VERSION_LOG_PATH}sed -i '/'XYZ'/,+3d' ${VERSION_LOG_PATH}echo "============ zp javatool-server info ===========" >> ${VERSION_LOG_PATH}cd ${SOURCE_PATH}echo "Branch is: ${branch}..." >> ${VERSION_LOG_PATH}echo "Profile is: ${profile}..." >> ${VERSION_LOG_PATH}echo "CommitID is : $(git log --pretty=oneline -1)..." >> ${VERSION_LOG_PATH}}######################################## MAIN ########################################export LANG="zh_CN.UTF-8"# 设置全局常量SOURCE_PATH=/home/zp/source/JavaStackSCRIPT_PATH=/home/zp/source/JavaStack/scripts# 分配 script 和 config 目录的权限chmod -R 755 /home/zp/source/JavaStack# 0. 获取传入参数并检查branch=`echo 1ドル`profile=`echo 2ドル`repository=`echo 3ドル`checkInputcheckFolderExist ${SOURCE_PATH}checkFolderExist ${SCRIPT_PATH}checkFileExist ${SCRIPT_PATH}/git-clone.shcheckFileExist ${SCRIPT_PATH}/javatool-server-run.shcheckFileExist ${SCRIPT_PATH}/embed-tomcat-server-boot.sh# 1. 停止应用#echo "停止所有 javatool-server 应用开始"#${SCRIPT_PATH}/javatool-server-run.sh ${profile} stop#echo "停止所有 javatool-server 应用结束"# 2. 更新代码cd ${SOURCE_PATH}${SCRIPT_PATH}/git-clone.sh JavaStack ${branch}chmod -R 777 ${SOURCE_PATH}# 3. 替换配置#${SCRIPT_PATH}/javatool-server-replace-config.sh ${SOURCE_PATH} ${profile}# 4. 编译打包cd ${SOURCE_PATH}/codes/javatoolmvn clean package -Dmaven.test.skip=true# 5. 启动应用echo "启动所有 javatool-server 应用开始"# 手动释放内存echo 3 > /proc/sys/vm/drop_caches${SCRIPT_PATH}/javatool-server-run.sh ${profile} startecho "启动所有 javatool-server 应用结束"## 6. 记录发布的版本信息saveVersionInfo
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。