svn commit: r788639 - in /lenya/zone/bin: nightlies.sh nightly-2-0-x.sh

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: ragaller
Date: Fri Jun 26 09:31:12 2009
New Revision: 788639

URL: http://svn.apache.org/viewvc?rev=788639&view=rev
Log:
new shell script for the 2-0-x branch

Added:
    lenya/zone/bin/nightly-2-0-x.sh   (with props)
Modified:
    lenya/zone/bin/nightlies.sh

Modified: lenya/zone/bin/nightlies.sh
URL: http://svn.apache.org/viewvc/lenya/zone/bin/nightlies.sh?rev=788639&r1=788638&r2=788639&view=diff
==============================================================================
--- lenya/zone/bin/nightlies.sh (original)
+++ lenya/zone/bin/nightlies.sh Fri Jun 26 09:31:12 2009
@@ -5,11 +5,11 @@
 echo "Starting to deploy nightlies " > $logfileMain
 echo "starting date is " >> $logfileMain
 date >> $logfileMain
+#echo >> $logfileMain
+#echo "starting branch" >> $logfileMain
+#nightly-branch.sh  >> $logfileMain 2>&1
 echo >> $logfileMain
-echo "starting branch" >> $logfileMain
-nightly-branch.sh  >> $logfileMain 2>&1
-echo >> $logfileMain
-echo "starting trunk" >> $logfileMain
-nightly-trunk.sh  >> $logfileMain 2>&1
+echo "starting lenya-2.0.x" >> $logfileMain
+nightly-2-0-x.sh  >> $logfileMain 2>&1
 echo "last update " >> $logfileMain
 date >> $logfileMain
\ No newline at end of file

Added: lenya/zone/bin/nightly-2-0-x.sh
URL: http://svn.apache.org/viewvc/lenya/zone/bin/nightly-2-0-x.sh?rev=788639&view=auto
==============================================================================
--- lenya/zone/bin/nightly-2-0-x.sh (added)
+++ lenya/zone/bin/nightly-2-0-x.sh Fri Jun 26 09:31:12 2009
@@ -0,0 +1,101 @@
+#!/usr/bin/bash
+help()
+{
+ cat <<HELP
+
+This script will build the lenya-2.0.x branch
+http://lenya.zones.apache.org:9999/index.html
+
+Further you can invoke/prevent "svn update"
+and the building of cocoon/lenya.
+
+USAGE EXAMPLE:  nightlies.sh -u false 
+EXAMPLE RESULT: lenya site will be just builded.
+
+USAGE EXAMPLE:  nightlies.sh -u true 
+EXAMPLE RESULT: lenya site will be update to svn HEAD and builded.
+
+Values are:
+-u = update = true|false
+
+Default is set to true, so if you use this script 
+without option we are making a full build round-trip 
+and svn update.
+
+HELP
+}
+source /export/home/lenya/bin/setenv.sh
+source /export/home/lenya/bin/mail.sh
+umask 0002
+logfile=$DOC_ROOT/log/lenya.2.0.x.update.log 
+weblog=$WEB_LOGS/lenya.2.0.x.update.log
+echo "Deploying lenya.2.0.x" > $logfile
+echo "starting date is " >> $logfile
+date >> $logfile
+update=true
+while [ -n "$1" ]; do
+case $1 in
+    -h) help;exit 1;; # function help is called
+    -u) update=$2;shift 2;; 
+    --) shift;break;; # end of options
+    -*) echo "error: no such option $1. -h for help.";exit 1;;
+    *)  break;;
+esac
+done
+
+
+#update trunk & restart
+echo >> $logfile
+echo "#update trunk (if not set to false) & restart" >> $logfile
+cd /export/home/lenya/src/lenya-2.0.x
+if [ $update = true ]; then
+ echo "#svn up" >> $logfile 
+ svn up >> $logfile 2>&1
+ statusUpdate=$?
+  if [ ! $statusUpdate ]; then
+   subject="[lenya.2.0.x.update] lenya-2.0.x svn update failed"
+   message="Please resolve possible conflicts by hand login into the zone server and looking at /export/home/lenya/src/lenya-2.0.x"
+   sendMsg "$subject" "$weblog" "$message"
+   exit 1
+  fi
+fi
+#first, kill running lenya instance
+echo >> $logfile
+echo "#first, kill running lenya instance" >> $logfile 
+TRUNK_PID=`cat /export/home/lenya/bin/lenya-2.0.x.pid`
+ps -ef |grep lenya|grep $TRUNK_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh >> $logfile
+rm /export/home/lenya/bin/lenya-2.0.x.pid  >> $logfile
+echo "#building clean" >> $logfile 2>&1
+./build.sh clean-all >> $logfile 2>&1
+  check=`cat $logfile|grep "BUILD FAILED"`
+ echo "statusCheck=$check" >> $logfile
+ if [ -n "$check" ]; then
+   subject="[lenya.2.0.x.update] lenya-2.0.x build clean failed"
+   message="Please resolve possible conflicts by hand login into the zone server and looking at  /export/home/lenya/src/lenya-2.0.x"
+   sendMsg "$subject" "$weblog" "$message"
+   exit 1
+ fi
+echo "#building" >> $logfile 2>&1
+./build.sh >> $logfile 2>&1
+ check=`cat $logfile|grep "BUILD FAILED"`
+ echo "statusCheck=$check" >> $logfile
+ if [ -n "$check" ]; then
+   subject="[lenya.2.0.x.update] lenya-2.0.x build failed"
+   message="Please resolve possible conflicts by hand login into the zone server and looking at  /export/home/lenya/src/lenya-2.0.x"
+   sendMsg "$subject" "$weblog" "$message"
+   exit 1
+ fi
+echo "#tests" >> $logfile 2>&1
+./build.sh test >> $logfile 2>&1
+ check=`cat $logfile|grep "BUILD FAILED"`
+ echo "statusCheck=$check" >> $logfile
+ if [ -n "$check" ]; then
+   subject="[lenya.2.0.x.update] lenya-2.0.x tests failed"
+   message="Please help to fix the tests. ATM most of them fail because they are empty."
+   sendMsg "$subject" "$weblog" "$message"
+ fi
+echo "#starting" >> $logfile 2>&1
+./lenya.sh servlet >> $logfile 2>&1 &
+echo $! > /export/home/lenya/bin/lenya-2.0.x.pid
+echo "last update " >> $logfile
+date >> $logfile

Propchange: lenya/zone/bin/nightly-2-0-x.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lenya/zone/bin/nightly-2-0-x.sh
------------------------------------------------------------------------------
    svn:executable = *
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.