[infinispan-commits] Infinispan SVN: r923 - trunk/bin.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Oct 8 05:49:06 EDT 2009
Author: manik.surtani at jboss.com
Date: 2009-10-08 05:49:06 -0400 (Thu, 08 Oct 2009)
New Revision: 923
Modified:
trunk/bin/release.py
Log:
Fixed to take into account other POMs that are not direct modules of root, e.g., cachestore/pom.xml
Modified: trunk/bin/release.py
===================================================================
--- trunk/bin/release.py 2009-10-08 09:48:17 UTC (rev 922)
+++ trunk/bin/release.py 2009-10-08 09:49:06 UTC (rev 923)
@@ -3,6 +3,7 @@
import sys
import os
import subprocess
+
try:
from xml.etree.ElementTree import ElementTree
except:
@@ -81,7 +82,13 @@
return self.client
-svnConn = SvnConn()
+svnConn = None
+
+def get_svn_conn():
+ if not svnConn:
+ svnConn = SvnConn()
+ return svnConn
+
modules = []
def getModules(directory):
# look at the pom.xml file
@@ -120,7 +127,8 @@
helpAndExit()
def tagInSubversion(version, newVersion):
- svnConn.tag("%s/trunk" % svnBase, newVersion, version)
+ sc = get_svn_conn()
+ sc.tag("%s/trunk" % svnBase, newVersion, version)
def getProjectVersionTag(tree):
return tree.find("./{%s}version" % (maven_pom_xml_namespace))
@@ -166,18 +174,25 @@
if need_to_write:
# write to file again!
writePom(tree, pomFile)
-
-def updateVersions(version, workingDir):
- client = svnConn.getClient()
- client.checkout(svnBase + "/tags/" + version, localTagsDir + '/' + version)
-
- # Find the root pom first
+
+def get_poms_to_patch(workingDir):
getModules(workingDir)
print 'Available modules are ' + str(modules)
pomsToPatch = [workingDir + "/pom.xml"]
for m in modules:
pomsToPatch.append(workingDir + "/" + m + "/pom.xml")
+ # Look for additional POMs that are not directly referenced!
+ for additionalPom in GlobDirectoryWalker(workingDir, 'pom.xml'):
+ if additionalPom not in pomsToPatch:
+ pomsToPatch.append(additionalPom)
+ return pomsToPatch
+
+def updateVersions(version, workingDir):
+ client = get_svn_conn().getClient()
+ client.checkout(svnBase + "/tags/" + version, localTagsDir + '/' + version)
+ pomsToPatch = get_poms_to_patch()
+
for pom in pomsToPatch:
patch(pom, version)
@@ -222,7 +237,7 @@
def checkInMaven2Repo(version, workingDir):
os.chdir(localMvnRepoDir)
- client = svnConn.getClient()
+ client = get_svn_conn().getClient()
poms = [workingDir + "/pom.xml"]
for m in modules:
poms.append(workingDir + "/" + m + "/pom.xml")
More information about the infinispan-commits
mailing list