From b4367732c8318153c4ba407384e6b70fab5cd51d Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Fri, 6 Mar 2015 12:32:52 +1000 Subject: [PATCH] Added PDFs to the generated content tracked by the publish_hbase_website script, enabled test to abort the automatic svn commit if it changes too many files. --- dev-support/publish_hbase_website.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/dev-support/publish_hbase_website.sh b/dev-support/publish_hbase_website.sh index 65d2b949d4e..072de8dcf04 100755 --- a/dev-support/publish_hbase_website.sh +++ b/dev-support/publish_hbase_website.sh @@ -151,7 +151,7 @@ fi # Delete known auto-generated content from trunk echo "Deleting known auto-generated content from SVN" -rm -rf apidocs devapidocs xref xref-test book book.html java.html +rm -rf apidocs devapidocs xref xref-test book book.html java.html apache_hbase_reference_guide.pdf* # Copy generated site to svn -- cp takes different options on Darwin and GNU echo "Copying the generated site to SVN" @@ -166,13 +166,15 @@ cp $COPYOPTS $GIT_DIR/target/staging/* . # Look for things we need to fix up in svn echo "Untracked files: svn add" -svn status |grep '?' |sed -e "s/[[:space:]]//g"|cut -d '?' -f 2|while read i - do svn add $i +svn status |grep '?' |sed -e "s/[[:space:]]//g"|cut -d '?' -f 2|while read i; do + svn add $i + echo "Added $i" done echo "Locally deleted files: svn del" -svn status |grep '!' |sed -e "s/[[:space:]]//g"|cut -d '!' -f 2|while read i - do svn del $i +svn status |grep '!' |sed -e "s/[[:space:]]//g"|cut -d '!' -f 2|while read i; do + svn del $i + echo "Deleted $i" done # Display the proposed changes. I filtered out @@ -196,12 +198,12 @@ SVN_NUM_DIFF=`expr $SVN_NEW_NUMFILES - $SVN_OLD_NUMFILES|sed 's/-//g'` # The whole site is only 500 MB so a difference of 10 MB is huge # In this case, we should abort because something is wrong # Leaving this commented out for now until we get some benchmarks -#if [ $SVN_SIZE_DIFF > 10 -o $SVN_NUM_DIFF > 50 ]; then -# echo "This commit would cause the website to change sizes by \ -# $SVN_DIFF MB and $SVN_NUM_DIFF files. There is likely a problem. -# Aborting." -# exit 1 -#fi +if [ $SVN_SIZE_DIFF > 10 -o $SVN_NUM_DIFF > 50 ]; then + echo "This commit would cause the website to change sizes by \ + $SVN_DIFF MB and $SVN_NUM_DIFF files. There is likely a problem. + Aborting." + exit 1 +fi if [ $INTERACTIVE ]; then