[richfaces-svn-commits] JBoss Rich Faces SVN: r13493 - trunk/docs.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Apr 10 09:51:24 EDT 2009


Author: artdaw
Date: 2009-04-10 09:51:24 -0400 (Fri, 10 Apr 2009)
New Revision: 13493

Modified:
   trunk/docs/release.sh
Log:
https://jira.jboss.org/jira/browse/RF-6698 - Shell script was improved. Necessary info was added to the Wiki

Modified: trunk/docs/release.sh
===================================================================
--- trunk/docs/release.sh	2009-04-10 13:37:47 UTC (rev 13492)
+++ trunk/docs/release.sh	2009-04-10 13:51:24 UTC (rev 13493)
@@ -1,30 +1,35 @@
 #!/bin/bash
-# This script is used for the release build
-# Author Gleb Galkin
+# This script is used for the documentation release build
+# Author: Gleb Galkin <ggalkin at exadel.com>
 
 #REQUIREMENTS:
 # If you use cygwin, please, check whether 'cpio' package is installed
 
-#Here you should define necessary variables:
-# 1. define the absolute path to the 'trunk' directory in the TRUNK variable
-# 2. define the absolute path to the 'freezone/doc' directory in the FREEZONE variable
-#3. define  path and name of the log file in the LOG variable
-#4. define user name for commit in the USER variable
-#5. define password for commit in the PASS variable
-#6. define message for commit in the MESSAGE variable
+#NOTE:
+# If some docs were added you should add the pathes to the DOCS array:
+# 1. proceed to the $TRUNK/ui/assembly directory 
+# 2. open pom.xml file in your favorite text editor
+# 3. find release profile with maven-dependency-plugin inside
+# 4. add necessary artifactItem, e.g.
+#	<artifactItem>
+#		<groupId>org.richfaces.docs.userguide</groupId>
+#		<artifactId>en</artifactId>
+#		<version>${project.version}</version>
+#		<type>jar</type>
+#		<outputDirectory>${project.build.directory}/docs/userguide/en</outputDirectory>
+#	</artifactItem>
+# 5. finally you should add necessary docs formats to the DOCS array as follows:
+# [n]="SRC=$TRUNK/ui/assembly/target/docs/userguide/en/html TARGET=$FREEZONE/devguide/en/html"
+# where'n' is the next array index
 
-# If you run this script for the first time you could check all the pathes in the DOC array if it is really needed. In order to check them take the following steps:
+
+# If you run this script for the first time or some docs were already added you could check all the pathes in the DOCS array. In order to check them take the following steps:
 # 1. run the following command from the trunk root:  mvn clean install -P release,docs,release_docs -Dmaven.test.skip=true 
-# 2. proceed to the $TRUNK/ui/assembly/target directory and check all pathes that have been defined in the DOC array, SRC field. If some of them have been changed rewrite them manually 
-# 3. finnally proceed to the $FREEZONE directory and and check all pathes that have been defined in the DOC array, TARGET field. If some of them have been changed rewrite them manually
+# 2. proceed to the $TRUNK/ui/assembly/target directory and check all pathes that have been defined in the DOCS array, SRC field. If some of them have been changed rewrite them manually 
+# 3. finnally proceed to the $FREEZONE directory and check all pathes that have been defined in the DOCS array, TARGET field. If some of them have been changed rewrite them manually
 
-TRUNK="D:/workspaceRF/trunk"
-FREEZONE="D:/workspaceRF/online/freezone/docs"
-LOG="log_release.txt"
-USER="smukhina"
-PASS=""
-MESSAGE=""
-
+##    Array of DOCs
+##############################################################################################################
 DOCS=(
 	[0]="SRC=$TRUNK/ui/assembly/target/apidocs TARGET=$FREEZONE/apidoc"
 	[1]="SRC=$TRUNK/ui/assembly/target/tlddoc TARGET=$FREEZONE/tlddoc"
@@ -37,6 +42,9 @@
 	[8]="SRC=$TRUNK/ui/assembly/target/docs/userguide/en/pdf TARGET=$FREEZONE/devguide/en/pdf"
 )
 
+##############################################################################################################
+
+
 function die(){
 	printLog "$@"
 	exit 1
@@ -68,8 +76,9 @@
 		printLog "Try to delete unnecessary files..."
 		svn status | grep '^\!' | grep -o -P [^\!^" ""\n\r?"]+ | while read -r;do svn rm $REPLY >> $LOG 2>&1; done || die "Something wrong with svn remove. See the log file"
 		
+		#Try to commit files
 		printLog "Try to commit files..."
-		#svn commit --username $USER --password $PASS --message $MESSAGE >> $LOG 2>&1 || die "Something wrong with svn commit. See the log file"
+		svn commit --username $USER --password $PASS --message $MESSAGE >> $LOG 2>&1 || die "Something wrong with svn commit. See the log file"
 	done
 }
 
@@ -83,12 +92,50 @@
 	echo >> $LOG
 }
 
-if [ $TRUNK="" -o $FREEZONE="" -o $LOG="" -o $USER="" -o $PASS="" -o $MESSAGE="" ]
-then
-	echo "Please, specify necessary variables. See the header of this script"
-	exit 1
-fi
+function validateInput () {
+	if [ -d $@ ]
+	then
+	echo ""
+	else
+	die $@ ": No such directory"
+	fi
+}
 
+echo -e "\n\r Attention! 
+\r If you use cygwin, please, check whether 'cpio' package is installed!
+\r If you run this script for the first time or some new docs were added to the build \r 
+\r you should check all the pathes in the DOCS array! 
+\r In order to check them, please, open this shell script in your favorite text editor and read NOTE section at the beginnig of the file."
+while true
+do
+  echo -n "Are you sure to begin build process? [Y or N] :"
+  read CONFIRM
+  case $CONFIRM in
+    y|Y|YES|yes|Yes) break ;;
+    n|N|no|NO|No)
+      echo "Thank you for you patience"
+      exit
+      ;;
+    *) echo Please enter only y or n
+  esac
+done
+
+
+echo -n "Define the ABSOLUTE path to the 'trunk' directory:"
+read -e TRUNK 
+validateInput $TRUNK
+echo -n "Define the ABSOLUTE path to the 'freezone/doc':"
+read -e FREEZONE 
+validateInput $FREEZONE
+echo -n "Define the ABSOLUTE path to the log file (e.g. /home/user/RFDocRelease.txt:"
+read -e LOG 
+echo -n "Specify your user name for commit:"
+read -e USER 
+read -s -p "Specify your password for commit: " PASS
+echo ""
+echo -n "Enter a message for commit:"
+read -e MESSAGE
+
 #Remove old log
 if [ -e $LOG ]
 then




More information about the richfaces-svn-commits mailing list