由建议
khmarbaise
现在有一个
common parent pom
到位。
mvn site
for all projects using this parent pom
使用一组通用的报告,结果将被传输到相应的github页面。
特定项目的pom现在可以
be as short as just 25 lines
我现在正在为pom文件创建一个检查脚本,并为README.md文件创建一个生成脚本。这是一个有用的片段:
用法示例:
checkghpages https://github.com/BITPlan com.bitplan.simplerest
检查gh页面是否存在,并在询问后创建
#
# check the github pages for the given project
#
# param 1: base url in github
# param 2: project name/directory
#
checkghpages() {
local l_baseurl="$1"
local l_project="$2"
cd $ws/$l_project
git ls-remote --heads | grep gh-pages > /dev/null
if [ $? -ne 0 ]
then
color_msg $red "github pages branch gh-pages missing for $l_project"
color_msg $blue "shall i create the branch gh-pages for $l_project?"
read answer
case $answer in
y|Y|yes|Yes|j|Ja)
color_msg $blue "creating gh-pages branch for $l_project ..."
cd /tmp
# https://gist.github.com/ramnathv/2227408
git clone $l_baseurl/$l_project
cd $l_project
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "<a href='$l_baseurl/$l_project'>Initial GitHub Page for $l_project</a>" > index.html
git add .
git commit -a -m "First pages commit by checkos script"
git push origin gh-pages
cd $ws/$l_project
git pull
;;
esac
else
color_msg $green "github pages branch gh-pages for $l_project existsâ"
fi
}