continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r230405 - /maven/continuum/trunk/ci_continuum.sh
Date Fri, 05 Aug 2005 07:36:23 GMT
Author: brett
Date: Fri Aug  5 00:36:18 2005
New Revision: 230405

URL: http://svn.apache.org/viewcvs?rev=230405&view=rev
Log:
update in line with m2 script

Modified:
    maven/continuum/trunk/ci_continuum.sh

Modified: maven/continuum/trunk/ci_continuum.sh
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/ci_continuum.sh?rev=230405&r1=230404&r2=230405&view=diff
==============================================================================
--- maven/continuum/trunk/ci_continuum.sh (original)
+++ maven/continuum/trunk/ci_continuum.sh Fri Aug  5 00:36:18 2005
@@ -27,11 +27,11 @@
   exit 1
 fi
 
-HOME_DIR=`pwd`
+HOME_DIR=$HOME
 DIR=$HOME_DIR/checkouts
 SUNREPO=$HOME_DIR/sunrepo
 REPO=$HOME_DIR/maven-repo-local
-SCM_LOG=scm.log
+SCM_LOG=$HOME_DIR/scm.log
 TIMESTAMP=`date +%Y%m%d.%H%M%S`
 WWW=$HOME/public_html
 DEPLOY_DIR=$WWW/builds
@@ -56,9 +56,7 @@
 # ----------------------------------------------------------------------------------
 rm -rf $M2_HOME
 
-mkdir $M2_HOME
-
-cp -r ~maven/m2 ~maven/maven-repo-local .
+cp -r /export/home/maven/m2 $M2_HOME
 
 # ----------------------------------------------------------------------------------
 
@@ -67,6 +65,11 @@
 
 # ----------------------------------------------------------------------------------
 
+BUILD_REQUIRED=false
+if [ -f $HOME_DIR/build_required ]; then
+  BUILD_REQUIRED=`cat $HOME_DIR/build_required`
+fi
+
 if [ ! -d $DIR/continuum ]; then
   CMD="checkout"
 fi
@@ -81,9 +84,7 @@
 
     rm -rf $REPO > /dev/null 2>&1
 
-    mkdir $REPO
-
-    cp -r ~maven/maven-repo-local .
+    cp -r /export/home/maven/maven-repo-local $REPO
 
     cp -R $SUNREPO/* $REPO/
 
@@ -94,9 +95,9 @@
     (
       cd $DIR
 
-      $SVN co http://svn.apache.org/repos/asf/maven/continuum/trunk continuum > $HOME_DIR/$SCM_LOG
2>&1
+      $SVN co http://svn.apache.org/repos/asf/maven/continuum/trunk continuum > $SCM_LOG
2>&1
 
-      build_continuum=1
+      echo "true" > $HOME_DIR/build_required
     )
 
   else
@@ -108,31 +109,38 @@
     (
       cd $DIR/continuum
 
-      $SVN update > $HOME_DIR/$SCM_LOG 2>&1
+      $SVN update > $SCM_LOG 2>&1
 
-      grep "^[PUAD] " $HOME_DIR/$SCM_LOG > /dev/null 2>&1
+      grep "^[PUAD] " $SCM_LOG > /dev/null 2>&1
 
       if [ "$?" = "1" ]
       then
-        build_continuum=0
-      else
-        build_continuum=1
-      fi
 
+        echo $BUILD_REQUIRED > $HOME_DIR/build_required
+
+          else
+        
+        echo "true" > $HOME_DIR/build_required
+
+      fi
     )
 
   fi
 
-  if [ build_continuum != 0 ]
+  BUILD_REQUIRED=`cat $HOME_DIR/build_required`
+
+  if [ "$BUILD_REQUIRED" = "true" ]
   then
       
     echo "Updates occured, build required ..."
     echo
+    grep "^[PUAD] " $SCM_LOG
+    echo
 
     (
       cd $DIR/continuum
 
-      sh build.sh -e --settings $HOME_DIR/settings.xml
+      $M2_HOME/bin/m2 -B -e clean:clean install
       ret=$?; if [ $ret != 0 ]; then exit $ret; fi
     )    
     ret=$?; if [ $ret != 0 ]; then exit $ret; fi
@@ -151,18 +159,19 @@
 
 host=`hostname`
 
-if [ build_continuum != 0 ]
+BUILD_REQUIRED=`cat $HOME_DIR/build_required`
+
+if [ "$BUILD_REQUIRED" = "true" ]
 then
   echo "From: $FROM" > log
   echo "To: $TO" >> log
   if [ $ret != 0 ]; then
     echo "Subject: [continuum build - FAILED - $CMD] $DATE" >> log
+  elif [ $fatal_error != 0 ]; then
+    echo "Subject: [continuum build - FAILED - $CMD] $DATE" >> log
   else
-    if [ fatal_error != 0 ]; then
-      echo "Subject: [continuum build - FAILED - $CMD] $DATE" >> log
-    else
-      echo "Subject: [continuum build - SUCCESS - $CMD] $DATE" >> log
-    fi
+    echo "Subject: [continuum build - SUCCESS - $CMD] $DATE" >> log
+    rm $HOME_DIR/build_required
   fi
   echo "" >> log
   echo "Log:" >> log



Mime
View raw message