echo "以时间定义文件夹名"
filedir="bole-`date +%Y%m%d%H%M`"
mkdir /opt/jenkins/target/bole/$filedir
filename="bole-`date +%Y%m%d%H%M%S`.war"
mv bole-control/target/*.war /opt/jenkins/target/bole/$filedir/$filename
mv script/bole.sql /opt/jenkins/target/bole/$filedir
echo "当前war版本为:$filename" >>/opt/jenkins/target/bole/$filedir/releaseNotes.txt
echo "获取并移动最新sql语句"
cd script
newSql=$(ls -rt *.sql | tail -1)
mv $newSql /opt/jenkins/target/bole/$filedir
echo "获取并移动最新接口文档"
cd ../doc
newDoc=$(ls -rt *.docx | tail -1)
filedir="bole-`date +%Y%m%d%H%M`"
mkdir /opt/jenkins/target/bole/$filedir
filename="bole-`date +%Y%m%d%H%M%S`.war"
mv bole-control/target/*.war /opt/jenkins/target/bole/$filedir/$filename
mv script/bole.sql /opt/jenkins/target/bole/$filedir
echo "当前war版本为:$filename" >>/opt/jenkins/target/bole/$filedir/releaseNotes.txt
echo "获取并移动最新sql语句"
cd script
newSql=$(ls -rt *.sql | tail -1)
mv $newSql /opt/jenkins/target/bole/$filedir
echo "获取并移动最新接口文档"
cd ../doc
newDoc=$(ls -rt *.docx | tail -1)
mv $newDoc /opt/jenkins/target/bole/$filedir