geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r330171 - /geronimo/scripts/publish_build.sh
Date Wed, 02 Nov 2005 02:23:54 GMT
Author: dblevins
Date: Tue Nov  1 18:23:53 2005
New Revision: 330171

URL: http://svn.apache.org/viewcvs?rev=330171&view=rev
Log:
A trimmed down unstable build script.

Modified:
    geronimo/scripts/publish_build.sh

Modified: geronimo/scripts/publish_build.sh
URL: http://svn.apache.org/viewcvs/geronimo/scripts/publish_build.sh?rev=330171&r1=330170&r2=330171&view=diff
==============================================================================
--- geronimo/scripts/publish_build.sh (original)
+++ geronimo/scripts/publish_build.sh Tue Nov  1 18:23:53 2005
@@ -1,4 +1,4 @@
-#!/usr/local/bin/bash
+#!/bin/bash
 #
 #  Copyright 2005 The Apache Software Foundation
 # 
@@ -40,7 +40,6 @@
 #  The public repo url for geronimo
 SVN_URL="http://svn.apache.org/repos/asf/$PROJ"
 
-
 #  Get the current svn revision number for geronimo
 #  Example: 123456
 SVN_VERSION=$(wget -q -O - $SVN_URL/trunk | grep title | sed 's/[^0-9]//g')
@@ -55,7 +54,7 @@
 #  Example value: geronimo-1.0-123456
 RELEASE_ID="$PROJ-$VERSION"
 
-#  Example value: /www/cvs.apache.org/dist/geronimo/unstable/geronimo-1.0-123456
+#  Example value: /www/cvs.apache.org/dist/geronimo/unstable/1.0-123456
 VERSION_DIR="$RELEASE_DIR/$VERSION"
 
 echo "$RELEASE_ID"
@@ -68,13 +67,6 @@
     tar czf $DEST.tar.gz $SOURCE
     zip -9rq $DEST.zip $SOURCE
 }
-function replace_version { # VERSION, PROJ
-    local PROJ=${1?Must specify a project name}
-    local VERSION=${2?Must specify a new version name}
-
-    perl -i.bak -pe "s/(${PROJ}_version)=.*/\$1=${VERSION}/" etc/project.properties
-    perl -i.bak -pe "s/<(currentVersion)>[^<]*<\/currentVersion>.*/<\$1>${VERSION}<\/\$1>/"
plugins/maven-geronimo-plugin/project.xml
-}
 function publish_build_archives {
 
     #  We want to checkout Geronimo into a directory that will be named
@@ -82,23 +74,8 @@
     #  it up before we build it.
     #
     #  The directory will be named geronimo-1.0-SVN_REVISION_NUMBER
-    svn checkout --revision $SVN_VERSION $SVN_URL/trunk $RELEASE_ID
+    svn export --revision $SVN_VERSION $SVN_URL/trunk $RELEASE_ID
     
-    #  We have some pretty tight snapshot dependencies.  You just can't
-    #  build geronimo without them.  So let's include them too.
-    cp -r openejb $RELEASE_ID/modules/
-    cp -r tranql $RELEASE_ID/modules/
-    cp -r tranql-connector $RELEASE_ID/modules/
-
-    #  The .svn directories contain a copy of all the files, so we should 
-    #  delete them our or source zip and tar files will be twice as big 
-    #  as they need to be.
-    find $RELEASE_ID -name '.svn' -exec rm -rf {} \;
-
-    #  The geronimo version should be changed from SNAPSHOT to the 
-    #  svn revision number we checked out
-    ( cd $RELEASE_ID && replace_version $PROJ $VERSION )
-
     #  Now let's create the source zip and tar before we build while we
     #  still have a completely clean checkout with no target directories,
     #  velocity.log files and other junk created during a build.
@@ -108,7 +85,7 @@
     #  We don't run the tests as this is not a script for testing and reporting those test
results.
     #  If the build fails to compile, the 'fail' function is called and this script will
exit
     #  and nothing will be published.
-    ( cd $RELEASE_ID && maven -o -Dmaven.{itest,test}.skip=true ) || fail "Build
failed"
+    ( cd $RELEASE_ID && maven -o -Dgeronimo_version=$VERSION -Dmaven.{itest,test}.skip=true
m:checkout m:build-all ) || fail "Build failed"
 
     #  During the assembly module a directory called geronimo-1.0-SVN_REVISION was created.
 Let's 
     #  move in to that directory and create a geronimo-1.0-SVN_REVISION.zip and a tar.gz
of the same name.
@@ -165,7 +142,7 @@
     UNSTABLE_BUILDS=( $( $SSH ls -t $RELEASE_DIR ) )
 
     #  Set this to the number of builds you want to keep
-    KEEP=7
+    KEEP=14
    
     #  Now we create a new list skipping over the newest entries.
     DELETE_LIST=${UNSTABLE_BUILDS[@]:$KEEP}
@@ -178,29 +155,4 @@
     echo rm -r $DIST/* $RELEASE_ID
 }
 
-function setup {
-    svn co http://svn.apache.org/repos/asf/geronimo/trunk geronimo
-    cvs -d:pserver:anon@cvs.openejb.org:/scm/openejb co openejb
-    cvs -d:pserver:anon@cvs.tranql.codehaus.org:/scm/tranql co tranql
-    cvs -d:pserver:anon@cvs.tranql.codehaus.org:/scm/tranql co -d tranql-connector connector
-}
-
-[ ! -d geronimo ] || [ ! -d openejb ] && setup
-
-##  The following function is really for convenience of getting this 
-##  script to run given the current state of our build.  The intent is
-##  that this function will get deleted when running the build via a 
-##  plain 'maven' command is possible without running other builds first.
-function build {
-    MODULES=$(ls geronimo/{specs,plugins,modules}/*/project.xml openejb/modules/*/project.xml
tranql{,-connector}/project.xml | tr '\n' ',')
-    (cd geronimo && svn update) && 
-    (cd openejb && cvs -q up -dP) &&
-    (cd tranql && cvs -q up -dP) &&
-    (cd tranql-connector && cvs -q up -dP) &&
-    maven -Dmaven.{test,itest}.skip=true -Dmaven.multiproject.includes=$MODULES -Dgoal=default
multiproject:goal
-    (cd openejb && maven -o clean)
-    (cd tranql && maven -o clean)
-    (cd tranql-connector && maven -o clean)
-}
-
-build && publish_build_archives
+publish_build_archives



Mime
View raw message