cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [cayenne-website] branch master updated: Update docs building script
Date Thu, 30 Jul 2020 14:43:18 GMT
This is an automated email from the ASF dual-hosted git repository.

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a76094  Update docs building script
2a76094 is described below

commit 2a7609475c44628f238680917b3926500206f804
Author: Nikita Timofeev <stariy95@gmail.com>
AuthorDate: Thu Jul 30 17:43:12 2020 +0300

    Update docs building script
---
 build-docs.sh | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/build-docs.sh b/build-docs.sh
index 3be0fb7..1195731 100755
--- a/build-docs.sh
+++ b/build-docs.sh
@@ -50,14 +50,14 @@ function checkAndCreateDir() {
 function clearDir() {
     if [ -d "$1" ]; then
         echo "Clearing dir: $1"
-        rm -rf "$1/"
+        rm -rf "${1:?}/"
     fi
 }
 
 # no input, so just exit
 if [ -z "$1" ]; then
     echo "Usage: build-docs.sh git-tag [cayenne-version]"
-    exit -1
+    exit 1
 fi
 
 GIT_TAG="$1"
@@ -72,8 +72,8 @@ else
 fi
 
 # change dir to one with this script
-cd "$( dirname "${BASH_SOURCE[0]}" )"
-BASE_DIR=`pwd` # base project dir
+cd "$( dirname "${BASH_SOURCE[0]}" )" || exit 2
+BASE_DIR=$(pwd) # base project dir
 echo "Working dir: $BASE_DIR"
 
 # init and check paths
@@ -92,11 +92,16 @@ echo "Building docs for Cayenne $MAJOR_VERSION ($VERSION)"
 
 # clone git repo and checkout requested TAG
 git clone https://github.com/apache/cayenne.git "$CAYENNE_TMP_DIR" --branch "$GIT_TAG" --depth
1
-cd  "$CAYENNE_TMP_DIR"
+cd  "$CAYENNE_TMP_DIR" || exit 3
 
 # build it
 echo "Running Maven build... it can take a while..."
-mvn install -Passembly -q -DskipTests > /dev/null 2>&1
+mvn package -Passembly -q -DskipTests -pl \!modeler,\!modeler/cayenne-modeler,\
+  \!modeler/cayenne-modeler-generic,\!modeler/cayenne-modeler-generic-ext,\
+  \!modeler/cayenne-modeler-mac,\!modeler/cayenne-modeler-mac-ext,\
+  \!modeler/cayenne-modeler-win,\!modeler/cayenne-modeler-win-ext,\
+  \!modeler/cayenne-wecompat,\!assembly \
+  > /dev/null 2>&1
 echo "Maven build complete"
 
 # copy JavaDoc
@@ -104,7 +109,7 @@ echo "Syncing JavaDoc to \"docs/$MAJOR_VERSION/api/\""
 rsync -a --delete "./docs/doc/target/site/apidocs/doc/api/" "$JAVA_DOC_DIR/api/"
 
 # copy everything from ./docs/asciidoc/**/target/site/** directories
-cd "$CAYENNE_TMP_DIR/docs/asciidoc/"
+cd "$CAYENNE_TMP_DIR/docs/asciidoc/" || exit 4
 for d in */ ; do
     if [ "$d" == "cayenne-asciidoc-extension/" ]; then
         continue


Mime
View raw message