You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by db...@apache.org on 2006/05/10 02:41:27 UTC

svn commit: r405575 - /geronimo/gbuild/scripts/publish_build.sh

Author: dblevins
Date: Tue May  9 17:41:25 2006
New Revision: 405575

URL: http://svn.apache.org/viewcvs?rev=405575&view=rev
Log:
Should work with all the latest updates since back in the milestone days

Modified:
    geronimo/gbuild/scripts/publish_build.sh

Modified: geronimo/gbuild/scripts/publish_build.sh
URL: http://svn.apache.org/viewcvs/geronimo/gbuild/scripts/publish_build.sh?rev=405575&r1=405574&r2=405575&view=diff
==============================================================================
--- geronimo/gbuild/scripts/publish_build.sh (original)
+++ geronimo/gbuild/scripts/publish_build.sh Tue May  9 17:41:25 2006
@@ -42,11 +42,11 @@
 
 #  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')
+export SVN_VERSION=$(wget -q -O - $SVN_URL/trunk | grep title | sed 's/[^0-9]//g')
 
 #  The version of geronimo we are building.  In the future we may have nightly builds
 #  of 1.0 and 2.0 going at the same time, so it's nice to include that in the build name
-VN='1.0'
+VN='1.1'
 
 #  Example value: 1.0-123456
 VERSION="$VN-$SVN_VERSION"
@@ -58,6 +58,10 @@
 VERSION_DIR="$RELEASE_DIR/$VERSION"
 
 echo "$RELEASE_ID"
+
+rm -r ~/.maven/cache
+rm -r ~/.maven/repository/geronimo/plugins
+rm -r ~/.maven/plugins
     
 ### Utility functions ########
 function shash { openssl $1 < $2 > $2.$1 ;}
@@ -67,6 +71,21 @@
     tar czf $DEST.tar.gz $SOURCE
     zip -9rq $DEST.zip $SOURCE
 }
+function replace_version {
+	perl -i.orig -pe 's,(-SNAPSHOT)?$,-$ENV{SVN_VERSION}, if /^(geronimo.packaging.)?geronimo_?(.*?plugin_)?[Vv]ersion=/' etc/project.properties  plugins/*/*.properties
+
+	perl -i.orig -pe '
+s,(</currentVersion>),-$ENV{SVN_VERSION}$1, unless /SNAPSHOT/;
+s,-SNAPSHOT(</currentVersion>),-$ENV{SVN_VERSION}$1,;
+s,-SNAPSHOT(</(dep:)?version>),-$ENV{SVN_VERSION}$1, if $p2 =~ /<(dep:)?groupId>geronimo/; 
+$p2=$p1; $p1=$_;
+' plugins/*/project.xml plugins/geronimo-packaging-plugin/src/test-resources/*.xml
+
+        #perl -i.orig -pe 's,SNAPSHOT,GERONIMO, if $p2 =~ /<groupId>geronimo/;$p2=$p1;$p1=$_' plugins/geronimo-packaging-plugin/src/test-resources/plan.xml
+
+	perl -i.orig -pe 's,(-SNAPSHOT)?$,-$ENV{SVN_VERSION}, if /^geronimo...=/' etc/explicit_versions.properties
+
+}
 function publish_build_archives {
 
     #  We want to checkout Geronimo into a directory that will be named
@@ -74,8 +93,10 @@
     #  it up before we build it.
     #
     #  The directory will be named geronimo-1.0-SVN_REVISION_NUMBER
-    svn export --revision $SVN_VERSION $SVN_URL/trunk $RELEASE_ID
+    svn export --revision $SVN_VERSION $SVN_URL/branches/1.1 $RELEASE_ID
     
+    ( cd $RELEASE_ID && replace_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.
@@ -85,12 +106,12 @@
     #  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 -Dgeronimo_version=$VERSION -Dmaven.{itest,test}.skip=true m:checkout m:build-all ) || fail "Build failed"
+    ( cd $RELEASE_ID && maven -o -Dgeronimo_version=$VERSION -Dmaven.{itest,test}.skip=true new ) || 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.
     #  When unpacked by users, these archives will extract into a directory called geronimo-1.0-SVN_REVISION/
-    ( cd $RELEASE_ID/$BIN_DIR && package $DIST/${RELEASE_ID} $RELEASE_ID ) || fail "Unable to make binary archives"
+    cp $RELEASE_ID/assemblies/*/target/*.{zip,gz} $DIST/  || faile "Unable to copy in built files"
 
     #  Let's create checksums for our source and binary tars and zips.
     for archive in $DIST/*.{zip,tar.gz}; do