Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
forked from turnon/java-tutorial
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (2)
master
gh-pages
master
Branches (2)
master
gh-pages
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (2)
master
gh-pages
java-tutorial
/
scripts
/
javatool-server-release.sh
java-tutorial
/
scripts
/
javatool-server-release.sh
javatool-server-release.sh 2.87 KB
Copy Edit Raw Blame History
turnon authored 2019年10月11日 18:23 +08:00 . format codes
#################################################################################
# javatool-server 发布脚本
#################################################################################
#
# 检查脚本参数,如必要参数未传入,退出脚本。
#
checkInput() {
if [ "${branch}" == "" ] || [ "${profile}" == "" ]; then
echo "请输入脚本参数:branch profile"
echo " branch: git分支(必填)。如 develop, master"
echo " profile: 运行环境(必填)。可选值:development/test"
echo "例:./javatool-server-release.sh master test"
exit 0
fi
}
#
# 检查文件是否存在,不存在则退出脚本
#
checkFileExist() {
if [ ! -f "1ドル" ]; then
echo "关键文件 1ドル 找不到,脚本执行结束"
exit 0
fi
}
#
# 检查目录是否存在,不存在则退出脚本
#
checkFolderExist() {
if [ ! -d "1ドル" ]; then
echo "关键目录 1ドル 找不到,脚本执行结束"
exit 0
fi
}
#
# 记录发布的版本信息
#
saveVersionInfo() {
VERSION_LOG_PATH=/home/zp/log/deploy/version.txt
if [ ! -f ${VERSION_LOG_PATH} ]; then
mkdir -p /home/zp/log/deploy
touch ${VERSION_LOG_PATH}
fi
chmod 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/JavaStack
SCRIPT_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ドル`
checkInput
checkFolderExist ${SOURCE_PATH}
checkFolderExist ${SCRIPT_PATH}
checkFileExist ${SCRIPT_PATH}/git-clone.sh
checkFileExist ${SCRIPT_PATH}/javatool-server-run.sh
checkFileExist ${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/javatool
mvn clean package -Dmaven.test.skip=true
# 5. 启动应用
echo "启动所有 javatool-server 应用开始"
# 手动释放内存
echo 3 > /proc/sys/vm/drop_caches
${SCRIPT_PATH}/javatool-server-run.sh ${profile} start
echo "启动所有 javatool-server 应用结束"
## 6. 记录发布的版本信息
saveVersionInfo
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

:coffee: 老司机在 Java 技术领域的十年积累。
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/lianghucheng/java-tutorial.git
git@gitee.com:lianghucheng/java-tutorial.git
lianghucheng
java-tutorial
java-tutorial
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /