# ------------------------------------------------------------------------------------------------- # count commited file num check=$($SVNLOOK changed -t $TXN $REPOS |awk 'NF!=2{for(i=2;i<=NF;i++)if(i!=NF)printf $i" ";if(i=NF)printf $i","}') # compare files if [ "$check" != "" ] then check_del=$($SVNLOOK changed -t $TXN $REPOS | awk '{for(i=1;i<NF;i++)if($i=="D")print $1}') if [ "$check_del" == "" ] then echo "The file name contains spaces.Please fix it and try again!." 1>&2 echo "不允许文件名存在空格!" 1>&2 exit 1 fi fi
# ------------------------------------------------------------------------------------------------- # Make sure that the log message contains some text. #SVNLOOK=/usr/local/subversion-1.8.11/bin/svnlook SVNLOOK=/usr/bin/svnlook LOGMSG=`$SVNLOOK log -t "$TXN" "$REPOS" | grep "[a-zA-Z0-9]" | wc -c` if [ "$LOGMSG" -lt 11 ]; then echo "Log message can't be empty! you must input more than 10 chars as comment!." 1>&2 echo "注释必须大于10个字符!" 1>&2 exit 1 fi
for p in "${projects[@]}"; do ${CURL} -XGET "http://admin:25087fe97bcf0a7ad370a7c21c8410ad@192.168.99.28:8080/job/${p}/buildWithParameters?token=b6c2901e49894712ef149dc1b92b15a2&cause=SVN+trigger+build&deploy_server=test" done