代码拉取完成,页面将自动刷新
#!/bin/bash
function pause {
echo
read -p "Press [enter] to continue"
}
# to exit in case of error
set -e
# make sure the script is launched from the project root directory
if [ "$(dirname $0)" != "." ]; then
echo "The script should be launched from Objenesis root directory"
exit 1
fi
# clone the website branch
echo "************** CLONE ************************"
pushd site
# delete all none hidden directories (keep .git for instance)
ls -1 | xargs rm -rf
# compile de new website
pushd ../website
mvn clean package
popd
# copy the new site to the branch
cp -R ../website/target/xsite/* .
# to help debugging in case of issue
echo "************** STATUS************************"
git status
# push the site
echo "************** COMMIT ***********************"
git add --ignore-removal .
git commit -m "from master $(git log | head -n 1)"
pause
echo "************** PUSH ************************"
git push origin gh-pages
popd
rm -rf site
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。