Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r701 - trunk: . hudson

argouml-gen
Discussion topic

Back to topic list

svn commit: r701 - trunk: . hudson

Reply

Author linus
Full name Linus Tolke
Date 2011-06-05 00:57:18 PDT
Message Author: linus
Date: 2011-06-05 00:57:17-0700
New Revision: 701

Modified:
   trunk/hudson/update-mirror2.sh
   trunk/update.sh

Log:
Improved the update scripts so they exit with error if something fails.

Modified: trunk/hudson/update-mirror2.sh
Url: http://argouml-gen.t​igris.org/source/bro​wse/argouml-gen/trun​k/hudson/update-mirr​or2.sh?view=diff​&pathrev=701&r1=​700&r2=701
====================​====================​====================​==================
--- trunk/hudson/update-mirror2.sh (original)
+++ trunk/hudson/update-mirror2.sh 2011-06-05 00:57:17-0700
@@ -1,10 +1,19 @@
 #!/bin/sh
 URLS="file://$HOME/​REPOS/argoeclipse.ti​gris.org/svn/argoecl​ipse \
       file://$HOME/REPOS/​argouml-stats.tigris​.org/svn/argouml-sta​ts"
+
+RET_VAL=0
 for url in $URLS
 do
- svnsync --non-interactive --no-auth-cache synchronize $url \
+ echo $(date): synchronize $url...
+ if svnsync --non-interactive --no-auth-cache synchronize $url \
       --username guest --password ""
+ then
+ echo $(date): synchronize $url...done
+ else
+ RET_VAL=2
+ echo $(date): synchronize $url...failed
+ fi
 done
 
-exit 0;
+exit $RET_VAL;

Modified: trunk/update.sh
Url: http://argouml-gen.t​igris.org/source/bro​wse/argouml-gen/trun​k/update.sh?view=dif​f&pathrev=701​&r1=700&r2=701
====================​====================​====================​==================
--- trunk/update.sh (original)
+++ trunk/update.sh 2011-06-05 00:57:17-0700
@@ -76,6 +76,7 @@
 
 ROOT=http:/
 export ROOT
+RET_VAL=0
 
 if $MIRRORED
 then
@@ -100,31 +101,35 @@
         echo exit 0 >> $PRERPC
         chmod +x $PRERPC
       )
- svnsync --non-interactive --no-auth-cache \
+ if svnsync --non-interactive --no-auth-cache \
           initialize $ROOT/$PROJMIDDLE http://$PROJMIDDLE \
           --username guest --password ""
- echo $(date): creating mirror for $proj...done
+ then
+ echo $(date): creating mirror for $proj...done
+ else
+ RET_VAL=3
+ echo $(date): creating mirror for $proj...failed
+ fi
     fi
 
     if $SYNCHRONIZE
     then
       echo $(date): synchronize $proj...
- svnsync --non-interactive --no-auth-cache \
- synchronize $ROOT/$PROJMIDDLE \
- --username guest --password "" 2>/dev/null ||
- svnsync --non-interactive --no-auth-cache \
- synchronize $ROOT/$PROJMIDDLE \
- --username guest --password "" 2>/dev/null ||
- svnsync --non-interactive --no-auth-cache \
+ if svnsync --non-interactive --no-auth-cache \
           synchronize $ROOT/$PROJMIDDLE \
           --username guest --password ""
- echo $(date): synchronize $proj...done
+ then
+ echo $(date): synchronize $proj...done
+ else
+ RET_VAL=2
+ echo $(date): synchronize $proj...failed
+ fi
     fi
   done
 
   if $INITIALIZE || $SYNCHRONIZE
   then
- exit 0;
+ exit $RET_VAL;
   fi
 fi
 
@@ -137,8 +142,14 @@
   for proj in $PROJECTS
   do
     echo $(date): checking out $proj...
- svn co $ROOT/$proj.tigris​.org/svn/$proj/trun​k $proj \
+ if svn co $ROOT/$proj.tigris​.org/svn/$proj/trun​k $proj \
         --username=guest --password=''
- echo $(date): checking out $proj...done
+ then
+ echo $(date): checking out $proj...done
+ else
+ RET_VAL=1
+ echo $(date): checking out $proj...done
+ fi
   done
+ exit $RET_VAL
 )

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r701 - trunk: . hudson linus Linus Tolke 2011-06-05 00:57:18 PDT
Messages per page: