brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [08/44] incubator-brooklyn git commit: docs to/from a javadoc dir
Date Fri, 09 Jan 2015 15:34:37 GMT
docs to/from a javadoc dir


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/65929cce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/65929cce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/65929cce

Branch: refs/heads/master
Commit: 65929ccef2a974ce80d72b6f3e45ddff201c6e48
Parents: a6a702c
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Sun Dec 28 12:21:37 2014 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Jan 7 14:20:39 2015 +0000

----------------------------------------------------------------------
 docs/_build/build.sh        | 23 +++++++++++++----------
 docs/_build/make-javadoc.sh | 13 ++++++++-----
 2 files changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/65929cce/docs/_build/build.sh
----------------------------------------------------------------------
diff --git a/docs/_build/build.sh b/docs/_build/build.sh
index a56f4c3..2d64688 100755
--- a/docs/_build/build.sh
+++ b/docs/_build/build.sh
@@ -3,6 +3,9 @@
 # this generates the site in _site
 # override --url /myMountPoint  (as an argument to this script) if you don't like the default
set in /_config.yml
 
+export JAVADOC_SUBPATH=misc/javadoc
+export JAVADOC_BUILD_TARGET_SUBPATH=javadoc
+
 if [ ! -x _build/build.sh ] ; then
   echo ERROR: script must be run in root of docs dir
   exit 1
@@ -54,7 +57,7 @@ function parse_mode() {
     DIRS_TO_MOVE_TARGET[1]=v/latest/style
     INSTALL_RSYNC_OPTIONS=""
     INSTALL_RSYNC_SUBDIR=${DIRS_TO_MOVE_TARGET[0]}/
-    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/use/api/
+    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/$JAVADOC_SUBPATH/
     SUMMARY="user guide files in /${DIRS_TO_MOVE_TARGET[0]}"
     ;;
   guide-version)
@@ -67,14 +70,14 @@ function parse_mode() {
     DIRS_TO_MOVE_TARGET[1]=${DIRS_TO_MOVE_TARGET[0]}/style
     INSTALL_RSYNC_OPTIONS=""
     INSTALL_RSYNC_SUBDIR=${DIRS_TO_MOVE_TARGET[0]}/
-    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/use/api/
+    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/$JAVADOC_SUBPATH/
     SUMMARY="user guide files in /${DIRS_TO_MOVE_TARGET[0]}"
     ;;
   test-guide-root)
     JEKYLL_CONFIG=_config.yml,_build/config-production.yml,_build/config-exclude-all-but-guide.yml,_build/config-guide-root.yml
     DIRS_TO_MOVE[0]=guide
     DIRS_TO_MOVE_TARGET[0]=""
-    JAVADOC_TARGET=use/api/
+    JAVADOC_TARGET=$JAVADOC_SUBPATH/
     SUMMARY="user guide files in the root"
     ;;
   test-both)
@@ -83,7 +86,7 @@ function parse_mode() {
     DIRS_TO_MOVE_TARGET[0]=v/latest
     DIRS_TO_MOVE[1]=website
     DIRS_TO_MOVE_TARGET[1]=""
-    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/use/api/
+    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/$JAVADOC_SUBPATH/
     SUMMARY="all files, website in root and guide in /${DIRS_TO_MOVE_TARGET[0]}"
     ;;
   test-both-sub)
@@ -94,7 +97,7 @@ function parse_mode() {
     DIRS_TO_MOVE_TARGET[1]=brooklyn
     DIRS_TO_MOVE[2]=style
     DIRS_TO_MOVE_TARGET[2]=brooklyn/style
-    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/use/api/
+    JAVADOC_TARGET=${DIRS_TO_MOVE_TARGET[0]}/$JAVADOC_SUBPATH/
     SUMMARY="all files in /brooklyn"
     ;;
   original)
@@ -160,7 +163,7 @@ function make_javadoc() {
     return
   fi
   pushd _build > /dev/null
-  rm -rf target/apidocs
+  rm -rf target/$JAVADOC_BUILD_TARGET_SUBPATH
   if [ "$QUICK_JAVADOC" == "true" ]; then
     ./quick-make-few-javadoc.sh || { echo ERROR: failed javadoc build ; exit 1 ; }
   else
@@ -172,7 +175,7 @@ function make_javadoc() {
       echo "ERROR: javadoc target directory _site/$JAVADOC_TARGET gone; is there a jekyll
already watching?"
       return 1
     fi
-    mv _build/target/apidocs/* _site/$JAVADOC_TARGET
+    mv _build/target/$JAVADOC_BUILD_TARGET_SUBPATH/* _site/$JAVADOC_TARGET
   fi
 }
 
@@ -199,14 +202,14 @@ function make_install() {
   
   if [ ! -z ${JAVADOC_TARGET+SET} ]; then
     if [ ! -z ${SKIP_JAVADOC+SET} ]; then
-      echo 'grep "Generated by javadoc" '$SITE_DIR/$INSTALL_RSYNC_SUBDIR/use/api/index.html
-      export JAVADOC_LAST_DATE=`grep "Generated by javadoc" $SITE_DIR/$INSTALL_RSYNC_SUBDIR/use/api/index.html`
+      echo 'grep "Generated by javadoc" '$SITE_DIR/$INSTALL_RSYNC_SUBDIR/$JAVADOC_SUBPATH/index.html
+      export JAVADOC_LAST_DATE=`grep "Generated by javadoc" $SITE_DIR/$INSTALL_RSYNC_SUBDIR/$JAVADOC_SUBPATH/index.html`
       if [ -z "$JAVADOC_LAST_DATE" ]; then
         echo "ERROR: installing with skipped javadoc, but no previous javadoc exists"
         return 1
       fi
       echo "Installing with skipped javadoc, reusing old: $JAVADOC_LAST_DATE"
-      RSYNC_COMMAND_BASE="$RSYNC_COMMAND_BASE --exclude use/api"
+      RSYNC_COMMAND_BASE="$RSYNC_COMMAND_BASE --exclude $JAVADOC_SUBPATH"
     fi
   fi
   

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/65929cce/docs/_build/make-javadoc.sh
----------------------------------------------------------------------
diff --git a/docs/_build/make-javadoc.sh b/docs/_build/make-javadoc.sh
index d7f862c..b44a407 100755
--- a/docs/_build/make-javadoc.sh
+++ b/docs/_build/make-javadoc.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 
+JAVADOC_TARGET1_SUBPATH=javadoc
+JAVADOC_TARGET2_SUBPATH=misc/javadoc
+
 if [ ! -x make-javadoc.sh ]; then
   echo This command must be run from the _build directory, not its parent.
   exit 1
@@ -13,7 +16,7 @@ else
   export SOURCE_PATHS=$BROOKLYN_JAVADOC_SOURCE_PATHS
 fi
 
-rm -rf target/apidocs/
+rm -rf target/$JAVADOC_TARGET1_SUBPATH/
 
 export DATESTAMP=`date "+%Y-%m-%d"`
 echo "building javadoc at $DATESTAMP from:
@@ -21,7 +24,7 @@ $SOURCE_PATHS"
 
 javadoc -sourcepath $SOURCE_PATHS \
   -public \
-  -d target/apidocs/ \
+  -d target/$JAVADOC_TARGET1_SUBPATH/ \
   -subpackages "org.apache.brooklyn:io.brooklyn:brooklyn" \
   -classpath ../../usage/all/target/brooklyn-all-0.7.0-SNAPSHOT-with-dependencies.jar \
   -doctitle "Apache Brooklyn" \
@@ -33,12 +36,12 @@ javadoc -sourcepath $SOURCE_PATHS \
 if ((${PIPESTATUS[0]})) ; then echo ; echo ; echo "ERROR: javadoc process exited non-zero"
; exit 1 ; fi
 echo ; echo
 
-if [ ! -f target/apidocs/brooklyn/entity/Entity.html ]; then echo "ERROR: missing expected
content. Are the paths right?" ; exit 1 ; fi
+if [ ! -f target/$JAVADOC_TARGET1_SUBPATH/brooklyn/entity/Entity.html ]; then echo "ERROR:
missing expected content. Are the paths right?" ; exit 1 ; fi
 
 if [ ! -z "`grep warnings target/javadoc.log`" ] ; then echo "WARNINGs occurred during javadoc
build. See target/javadoc.log for more information." ; fi
 
-if [ -d ../_site/guide/use/api/ ] ; then
+if [ -d ../_site/guide/$$JAVADOC_TARGET2_SUBPATH/ ] ; then
   echo "API directory detected in test structure _site, copying docs there so they can be
served with serve-site.sh"
-  cp -r target/apidocs/* ../_site/guide/use/api/
+  cp -r target/$JAVADOC_TARGET1_SUBPATH/* ../_site/guide/$JAVADOC_TARGET2_SUBPATH/
 fi
 


Mime
View raw message