[open-ils-commits] r17296 - trunk/build/tools (atz)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 20 16:13:41 EDT 2010


Author: atz
Date: 2010-08-20 16:13:36 -0400 (Fri, 20 Aug 2010)
New Revision: 17296

Modified:
   trunk/build/tools/update.sh
Log:
Allow STAFF_CLIENT_BUILD_ID to be passed in or set in ENV

Deconflict actions for STAFF_CLIENT_BUILD_ID='current'.  Build will
always end up in datestamped directory, but a symlink will be added
to it w/ the build ID string.  That should keep everybody happy.

Modified: trunk/build/tools/update.sh
===================================================================
--- trunk/build/tools/update.sh	2010-08-20 20:13:35 UTC (rev 17295)
+++ trunk/build/tools/update.sh	2010-08-20 20:13:36 UTC (rev 17296)
@@ -153,11 +153,14 @@
 fi
 sudo chown -R opensrf:opensrf $INSTALL
 
-BID=$(date +"%Y-%m-%dT%H:%M:%S");   # or "current"
+BIDDATE=$(date +"%Y-%m-%dT%H:%M:%S");
+BID=${STAFF_CLIENT_BUILD_ID:-$BIDDATE};   # or "current"
+
+rm -f "$XUL/current" || rm -rf "$XUL/current";      # removing the old link/build
 cd $ILS && sudo make install STAFF_CLIENT_BUILD_ID=$BID;
 sudo chown -R opensrf:opensrf $INSTALL
 
-[ -d "$XUL/$BID" ] || die_msg "New build directory $XUL/$BID was not created.  sudo make install failed?"
+[ -d "$XUL/$BID" ] || die_msg "New build directory $XUL/$BID was not created.  sudo make install failed?";
 
 if [ -z "$OPT_VERBOSE" ] ; then
     exec 1>&3   # Restore STDOUT
@@ -168,12 +171,20 @@
 rm -f $XUL/current-client-build.zip;
 cp -r "$ILS/Open-ILS/xul/staff_client/build" ./
 zip -rq current-client-build.zip build;
-cat ./build/BUILD_ID
+cat ./build/BUILD_ID;
 rm -rf ./build;
 
+echo "build ID is '$BID'";
 
+if [ "$BID" != "$BIDDDATE" ] ; then
+    mv $BID $BIDDATE;    # Move the non-timestamp directory to timestamp-based spot
+    ln -s $BIDDATE $BID; # link back to it
+fi
+
 rm -f current;      # removing the link to the old build
-ln -s $BID current; # linking "current" to the new build
+ln -s $BIDDATE current; # linking "current" to the new build
+
+rm -f server;
 ln -s current/server server;
     
 



More information about the open-ils-commits mailing list