[infinispan-commits] Infinispan SVN: r1143 - trunk/bin.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Wed Nov 11 19:43:09 EST 2009


Author: manik.surtani at jboss.com
Date: 2009-11-11 19:43:09 -0500 (Wed, 11 Nov 2009)
New Revision: 1143

Modified:
   trunk/bin/cleanlogs.py
   trunk/bin/findDisabledTests.py
   trunk/bin/listCommandIDs.py
   trunk/bin/pythonTools.py
   trunk/bin/release.py
Log:
Cleaned up python scripts

Modified: trunk/bin/cleanlogs.py
===================================================================
--- trunk/bin/cleanlogs.py	2009-11-11 20:01:28 UTC (rev 1142)
+++ trunk/bin/cleanlogs.py	2009-11-12 00:43:09 UTC (rev 1143)
@@ -1,5 +1,4 @@
 #!/usr/bin/python
-
 from __future__ import with_statement
 
 import re
@@ -12,14 +11,16 @@
 OUTPUT_FILE = "infinispan0.log"
 addresses = {}
 new_addresses = {}
+
 def find(filename, expr):
   with open(filename) as f:
     for l in f:
       if expr.match(l):
         handle(l, expr)
         break
-
+        
 def handle(l, expr):
+  """Handles a given line of log file, to be parsed and substituted"""
   m = expr.match(l)
   print "Using JGROUPS VIEW line:"
   print "   %s" % l 
@@ -37,7 +38,7 @@
 
 def usage():
   print '''
-    Usage: 
+  Usage: 
       $ bin/cleanlogs.py <N> <input_file> <output_file>
     OR:
       $ bin/cleanlogs.py <input_file> <output_file> to allow the script to guess which view is most appropriate.
@@ -48,6 +49,7 @@
   '''
 
 def guess_view(fn):
+  """Guesses which view is the most complete, by looking for the view with the largest number of members.  Inaccurate for log files that involve members leaving and others joining at the same time."""
   all_views_re = re.compile('.*Received new cluster view.*\|([0-9]+). \[(.*)\].*')
   views = {}
   with open(fn) as f:
@@ -60,6 +62,7 @@
   return views
 
 def most_likely_view(views):
+  """Picks the most likely view from a dictionary of views, keyed on view ID.  Returns the view ID."""
   largest_view = -1
   lvid = -1
   for i in views.items():
@@ -69,6 +72,7 @@
   return lvid
 
 def as_list(string_members):
+  """Returns a string of comma-separated member addresses as a list"""
   ml = []
   for m in string_members.split(","):
     ml.append(m.strip())
@@ -76,7 +80,6 @@
     
 def main():
   help()
-
   ### Get args
   if len(sys.argv) != 4 and len(sys.argv) != 3:
     usage()

Modified: trunk/bin/findDisabledTests.py
===================================================================
--- trunk/bin/findDisabledTests.py	2009-11-11 20:01:28 UTC (rev 1142)
+++ trunk/bin/findDisabledTests.py	2009-11-12 00:43:09 UTC (rev 1143)
@@ -4,29 +4,35 @@
 import sys
 from pythonTools import *
 
-## Walk through all files that end with Test.java
-startTime = time.clock()
-disabledTestFiles = []
-
-testAnnotationMatcher = re.compile('^\s*@Test')
-disabledMatcher = re.compile('enabled\s*=\s*false')
-
-for testFile in GlobDirectoryWalker(getSearchPath(sys.argv[0]), '*Test.java'):
+def main():
+  startTime = time.clock()
+  disabledTestFiles = []
+  
+  testAnnotationMatcher = re.compile('^\s*@Test')
+  disabledMatcher = re.compile('enabled\s*=\s*false')
+  
+  for testFile in GlobDirectoryWalker(getSearchPath(sys.argv[0]), '*Test.java'):
     tf = open(testFile)
     try:
-        for line in tf:
-            if testAnnotationMatcher.search(line):
-                if disabledMatcher.search(line):
-                    disabledTestFiles.append(testFile)
-                break
+      for line in tf:
+        if testAnnotationMatcher.search(line) and disabledMatcher.search(line):
+          disabledTestFiles.append(testFile)
+          break
     finally:
-        tf.close()
+      tf.close()
+      
+  print "Files containing disabled tests: \n"
+  uniqueTests=toSet(disabledTestFiles)
+  i = 1
+  for f in uniqueTests:
+    zeropad=""
+    if i < 10 and len(uniqueTests) > 9:
+      zeropad = " "
+    print "%s%s. %s" % (zeropad, str(i), stripLeadingDots(f))
+    i += 1
 
-print "Files containing disabled tests: \n"
-uniqueTests=toSet(disabledTestFiles)
-i=1
-for f in uniqueTests:
-    print str(i) + ". " + stripLeadingDots(f)
-    i=i+1
-
-print "\n      (finished in " +  str(time.clock() - startTime) + " seconds)"
+  print "\n      (finished in " +  str(time.clock() - startTime) + " seconds)"
+  
+if __name__ == '__main__':
+  main()
+  

Modified: trunk/bin/listCommandIDs.py
===================================================================
--- trunk/bin/listCommandIDs.py	2009-11-11 20:01:28 UTC (rev 1142)
+++ trunk/bin/listCommandIDs.py	2009-11-12 00:43:09 UTC (rev 1143)
@@ -4,7 +4,6 @@
 import sys
 from pythonTools import *
 
-
 command_file_name = re.compile('(commands/[a-zA-Z0-9/]*Command.java)')
 
 def trimName(nm):

Modified: trunk/bin/pythonTools.py
===================================================================
--- trunk/bin/pythonTools.py	2009-11-11 20:01:28 UTC (rev 1142)
+++ trunk/bin/pythonTools.py	2009-11-12 00:43:09 UTC (rev 1143)
@@ -1,47 +1,80 @@
 import os
 import fnmatch
 import re
+import subprocess
 
-### Crappy implementation of creating a Set from a List.  To cope with older Python versions
+
 def toSet(list):
-    tempDict = {}
-    for entry in list:
-        tempDict[entry] = "dummy"
-    return tempDict.keys()
+  """Crappy implementation of creating a Set from a List.  To cope with older Python versions"""
+  tempDict = {}
+  for entry in list:
+    tempDict[entry] = "dummy"
+  return tempDict.keys()
 
 def getSearchPath(executable):
-    inBinDir = re.compile('^.*/?bin/.*.py')
-    if inBinDir.search(executable):
-        return "./"
-    else:
-        return "../"
+  """Retrieves a search path based on where teh current executable is located.  Returns a string to be prepended to address any file in the Infinispan src directory."""
+  inBinDir = re.compile('^.*/?bin/.*.py')
+  if inBinDir.search(executable):
+    return "./"
+  else:
+    return "../"
 
 def stripLeadingDots(filename):
-    return filename.strip('/. ')
+  return filename.strip('/. ')
 
 class GlobDirectoryWalker:
-    # a forward iterator that traverses a directory tree
-
-    def __init__(self, directory, pattern="*"):
-        self.stack = [directory]
-        self.pattern = pattern
-        self.files = []
+  """A forward iterator that traverses a directory tree"""
+  def __init__(self, directory, pattern="*"):
+    self.stack = [directory]
+    self.pattern = pattern
+    self.files = []
+    self.index = 0
+    
+  def __getitem__(self, index):
+    while True:
+      try:
+        file = self.files[self.index]
+        self.index = self.index + 1
+      except IndexError:
+        # pop next directory from stack
+        self.directory = self.stack.pop()
+        self.files = os.listdir(self.directory)
         self.index = 0
+      else:
+        # got a filename
+        fullname = os.path.join(self.directory, file)
+        if os.path.isdir(fullname) and not os.path.islink(fullname):
+          self.stack.append(fullname)
+        if fnmatch.fnmatch(file, self.pattern):
+          return fullname
 
-    def __getitem__(self, index):
-        while 1:
-            try:
-                file = self.files[self.index]
-                self.index = self.index + 1
-            except IndexError:
-                # pop next directory from stack
-                self.directory = self.stack.pop()
-                self.files = os.listdir(self.directory)
-                self.index = 0
-            else:
-                # got a filename
-                fullname = os.path.join(self.directory, file)
-                if os.path.isdir(fullname) and not os.path.islink(fullname):
-                    self.stack.append(fullname)
-                if fnmatch.fnmatch(file, self.pattern):
-                    return fullname
+class SvnConn(object):
+  """An SVN cnnection making use of the command-line SVN client.  Replacement for PySVN which sucked for various reasons."""
+  def tag(self, fr_url, to_url, version):
+    """Tags a release."""
+    checkInMessage = "Infinispan Release Script: Tagging " + version
+    subprocess.check_call(["svn", "cp", fr_url, to_url, "-m", checkInMessage])
+    
+  def checkout(self, url, to_dir):
+    """Checks out a URL to the given directory"""
+    subprocess.check_call(["svn", "checkout", url, to_dir])
+    
+  def checkin(self, working_dir, msg):
+    """Checks in a working directory with the appropriate message"""
+    subprocess.check_call(["svn", "commit", "-m", msg, working_dir])
+    
+  def add(self, directory):
+    """Adds a directory or file to SVN.  Directory can either be the name of a file or dir, or a list of either."""
+    if directory:
+      call_params = ["svn", "add"]
+      if isinstance(directory, str):
+        call_params.append(directory)
+      else:
+        for d in directory:
+          call_params.append(d)
+      subprocess.check_call(call_params)
+      
+
+def get_svn_conn():
+  """Factory to create and retrieve an SvnConn instance"""
+  return SvnConn()

Modified: trunk/bin/release.py
===================================================================
--- trunk/bin/release.py	2009-11-11 20:01:28 UTC (rev 1142)
+++ trunk/bin/release.py	2009-11-12 00:43:09 UTC (rev 1143)
@@ -6,16 +6,16 @@
 import shutil
 
 try:
-    from xml.etree.ElementTree import ElementTree
+  from xml.etree.ElementTree import ElementTree
 except:
-    print '''
+  print '''
         Welcome to the Infinispan Release Script.
         This release script requires that you use at least Python 2.5.0.  It appears
         that you do not thave the ElementTree XML APIs available, which are available
         by default in Python 2.5.0.
-    '''
-    sys.exit(1)
-
+        '''
+  sys.exit(1)
+  
 from pythonTools import *
 
 ### Globals
@@ -37,30 +37,6 @@
 ################################################################################
 maven_pom_xml_namespace = "http://maven.apache.org/POM/4.0.0"
 
-class SvnConn(object):
-    def tag(self, fr_url, to_url, version):
-        checkInMessage = "Infinispan Release Script: Tagging " + version
-        subprocess.check_call(["svn", "cp", fr_url, to_url, "-m", checkInMessage])
-
-    def checkout(self, url, to_dir):
-       subprocess.check_call(["svn", "checkout", url, to_dir])
-
-    def checkin(self, working_dir, msg):
-       subprocess.check_call(["svn", "commit", "-m", msg, working_dir])
-
-    def add(self, directory):
-       if directory:
-          call_params = ["svn", "add"]
-          if isinstance(directory, str):
-             call_params.append(directory)
-          else:
-             for d in directory:
-                call_params.append(d)
-          subprocess.check_call(call_params)
-
-def get_svn_conn():
-    return SvnConn()
-
 modules = []
 def getModules(directory):
     # look at the pom.xml file
@@ -91,215 +67,214 @@
     sys.exit(0)
 
 def validateVersion(version):
-    versionPattern = re.compile("^[4-9]\.[0-9]\.[0-9]\.(GA|(ALPHA|BETA|CR|SP)[1-9][0-9]?)$", re.IGNORECASE)
-    if versionPattern.match(version):
-        return version.strip().upper()
-    else:
-        print "Invalid version '"+version+"'!\n"
-        helpAndExit()
+  versionPattern = re.compile("^[4-9]\.[0-9]\.[0-9]\.(GA|(ALPHA|BETA|CR|SP)[1-9][0-9]?)$", re.IGNORECASE)
+  if versionPattern.match(version):
+    return version.strip().upper()
+  else:
+    print "Invalid version '"+version+"'!\n"
+    helpAndExit()
 
 def tagInSubversion(version, newVersion):
-    sc = get_svn_conn()
-    sc.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))
+  return tree.find("./{%s}version" % (maven_pom_xml_namespace))
 
 def getParentVersionTag(tree):
-    return tree.find("./{%s}parent/{%s}version" % (maven_pom_xml_namespace, maven_pom_xml_namespace))
+  return tree.find("./{%s}parent/{%s}version" % (maven_pom_xml_namespace, maven_pom_xml_namespace))
 
 def getPropertiesVersionTag(tree):
-    return tree.find("./{%s}properties/{%s}project-version" % (maven_pom_xml_namespace, maven_pom_xml_namespace))
+  return tree.find("./{%s}properties/{%s}project-version" % (maven_pom_xml_namespace, maven_pom_xml_namespace))
 
 def writePom(tree, pomFile):
-    tree.write("tmp.xml", 'UTF-8')
-    in_f = open("tmp.xml")
-    out_f = open(pomFile, "w")
-    try:
-        for l in in_f:
-            newstr = l.replace("ns0:", "").replace(":ns0", "").replace("ns1", "xsi")
-            out_f.write(newstr)
-    finally:
-        in_f.close()
-        out_f.close()        
+  tree.write("tmp.xml", 'UTF-8')
+  in_f = open("tmp.xml")
+  out_f = open(pomFile, "w")
+  try:
+    for l in in_f:
+      newstr = l.replace("ns0:", "").replace(":ns0", "").replace("ns1", "xsi")
+      out_f.write(newstr)
+  finally:
+    in_f.close()
+    out_f.close()        
 
 def patch(pomFile, version):
-    ## Updates the version in a POM file
-    ## We need to locate //project/parent/version, //project/version and //project/properties/project-version
-    ## And replace the contents of these with the new version
-    print "Patching %s" % pomFile
-    tree = ElementTree()
-    tree.parse(pomFile)    
-    need_to_write = False
+  ## Updates the version in a POM file
+  ## We need to locate //project/parent/version, //project/version and //project/properties/project-version
+  ## And replace the contents of these with the new version
+  print "Patching %s" % pomFile
+  tree = ElementTree()
+  tree.parse(pomFile)    
+  need_to_write = False
 
-    tags = []
-    tags.append(getParentVersionTag(tree))
-    tags.append(getProjectVersionTag(tree))
-    tags.append(getPropertiesVersionTag(tree))
+  tags = []
+  tags.append(getParentVersionTag(tree))
+  tags.append(getProjectVersionTag(tree))
+  tags.append(getPropertiesVersionTag(tree))
 
-    for tag in tags:
-        if tag is not None:
-            #print "%s is %s.  Setting to %s" % (str(tag), tag.text, version)
-            tag.text=version
-            need_to_write = True
+  for tag in tags:
+    if tag:
+      #print "%s is %s.  Setting to %s" % (str(tag), tag.text, version)
+      tag.text=version
+      need_to_write = True
     
-    if need_to_write:
-        # write to file again!
-        writePom(tree, pomFile)
+  if need_to_write:
+    # write to file again!
+    writePom(tree, pomFile)
    
 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")
+  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
+  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()
-    client.checkout(svnBase + "/tags/" + version, localTagsDir + '/' + version)
-    pomsToPatch = get_poms_to_patch(workingDir)
+  client = get_svn_conn()
+  client.checkout(svnBase + "/tags/" + version, localTagsDir + '/' + version)
+  pomsToPatch = get_poms_to_patch(workingDir)
     
-    for pom in pomsToPatch:
-        patch(pom, version)
-
-    ## Now look for Version.java
-    version_bytes = '{'
-    for ch in version:
-        if not ch == ".":
-            version_bytes += "'%s', " % ch
-    version_bytes = version_bytes[:-2]
-    version_bytes += "}"
-    version_java = workingDir + "/core/src/main/java/org/infinispan/Version.java"
-    f_in = open(version_java)
-    f_out = open(version_java+".tmp", "w")
-    try:
-        for l in f_in:
-            if l.find("static final byte[] version_id = ") > -1:
-                l = re.sub('version_id = .*;', 'version_id = ' + version_bytes + ';', l)
-            else:
-                if l.find("public static final String version =") > -1:
-                    l = re.sub('version = "[A-Z0-9\.]*";', 'version = "' + version + '";', l)
-            f_out.write(l)
-    finally:
-        f_in.close()
-        f_out.close()
-
-    os.rename(version_java+".tmp", version_java)
-
-    # Now make sure this goes back into SVN.
-    checkInMessage = "Infinispan Release Script: Updated version numbers"
-    client.checkin(workingDir, checkInMessage)
-
+  for pom in pomsToPatch:
+    patch(pom, version)
+    
+  ## Now look for Version.java
+  version_bytes = '{'
+  for ch in version:
+    if not ch == ".":
+      version_bytes += "'%s', " % ch
+  version_bytes = version_bytes[:-2]
+  version_bytes += "}"
+  version_java = workingDir + "/core/src/main/java/org/infinispan/Version.java"
+  f_in = open(version_java)
+  f_out = open(version_java+".tmp", "w")
+  try:
+    for l in f_in:
+      if l.find("static final byte[] version_id = ") > -1:
+        l = re.sub('version_id = .*;', 'version_id = ' + version_bytes + ';', l)
+      else:
+        if l.find("public static final String version =") > -1:
+          l = re.sub('version = "[A-Z0-9\.]*";', 'version = "' + version + '";', l)
+          f_out.write(l)
+  finally:
+    f_in.close()
+    f_out.close()
+    
+  os.rename(version_java+".tmp", version_java)
+  
+  # Now make sure this goes back into SVN.
+  checkInMessage = "Infinispan Release Script: Updated version numbers"
+  client.checkin(workingDir, checkInMessage)
+  
 def buildAndTest(workingDir):
-    os.chdir(workingDir)
-    subprocess.check_call(["mvn", "install", "-Pjmxdoc",  "-Dmaven.test.skip.exec=true"])
-    subprocess.check_call(["mvn", "install", "-Pconfigdoc",  "-Dmaven.test.skip.exec=true"])
-    subprocess.check_call(["mvn", "deploy", "-Pdistribution",  "-Dmaven.test.skip.exec=true"])
+  os.chdir(workingDir)
+  subprocess.check_call(["mvn", "install", "-Pjmxdoc",  "-Dmaven.test.skip.exec=true"])
+  subprocess.check_call(["mvn", "install", "-Pconfigdoc",  "-Dmaven.test.skip.exec=true"])
+  subprocess.check_call(["mvn", "deploy", "-Pdistribution",  "-Dmaven.test.skip.exec=true"])
 
 def getModuleName(pomFile):
-    tree = ElementTree()
-    tree.parse(pomFile)
-    return tree.findtext("./{%s}artifactId" % maven_pom_xml_namespace)
+  tree = ElementTree()
+  tree.parse(pomFile)
+  return tree.findtext("./{%s}artifactId" % maven_pom_xml_namespace)
 
 def checkInMaven2Repo(version, workingDir):
-    os.chdir(localMvnRepoDir)
-    client = get_svn_conn()
-    poms = [workingDir + "/pom.xml"]
-    for m in modules:
-        poms.append(workingDir + "/" + m + "/pom.xml")
-    moduleNames=[]
-    for p in poms:
-        moduleNames.append(localMvnRepoDir + "/" + getModuleName(p) + "/" + version)
-    client.add(moduleNames)
-    for mn in moduleNames:
-        checkInMessage = "Infinispan Release Script: Releasing module " + mn + " version " + version + " to public Maven2 repo"
-        client.checkin(mn, checkInMessage)
+  os.chdir(localMvnRepoDir)
+  client = get_svn_conn()
+  poms = [workingDir + "/pom.xml"]
+  for m in modules:
+    poms.append(workingDir + "/" + m + "/pom.xml")
+  moduleNames=[]
+  for p in poms:
+    moduleNames.append(localMvnRepoDir + "/" + getModuleName(p) + "/" + version)
+  client.add(moduleNames)
+  for mn in moduleNames:
+    checkInMessage = "Infinispan Release Script: Releasing module " + mn + " version " + version + " to public Maven2 repo"
+    client.checkin(mn, checkInMessage)
 
 def uploadArtifactsToSourceforge(version):
-    os.mkdir(".tmp")
-    os.mkdir(".tmp/%s" % version)
-    os.chdir(".tmp")
-    shutil.copy("%s/infinispan/%s/*.zip" % (localMvnRepoDir, version), "%s/" % version)
-    subprocess.check_call(["scp", "-r", version, "sourceforge_frs:/home/frs/project/i/in/infinispan/infinispan"])
+  os.mkdir(".tmp")
+  os.mkdir(".tmp/%s" % version)
+  os.chdir(".tmp")
+  shutil.copy("%s/infinispan/%s/*.zip" % (localMvnRepoDir, version), "%s/" % version)
+  subprocess.check_call(["scp", "-r", version, "sourceforge_frs:/home/frs/project/i/in/infinispan/infinispan"])
 
 def uploadJavadocs(base_dir, workingDir, version):
-    os.chdir("%s/target/distribution" % workingDir)
-    ## Grab the distribution archive and un-arch it
-    subprocess.check_call(["unzip", "infinispan-%s-all.zip" % version])
-    os.chdir("infinispan-%s/doc" % version)
-    ## "Fix" the docs to use the appropriate analytics tracker ID
-    subprocess.check_call(["%s/bin/updateTracker.sh" % workingDir])
-    subprocess.check_call(["tar", "zcf", "%s/apidocs-%s.tar.gz" % (base_dir, version), "apidocs"])
-    ## Upload to sourceforge
-    os.chdir(base_dir)
-    subprocess.check_call(["scp", "apidocs-%s.tar.gz" % version, "sourceforge_frs:"])
-
-    print "API docs are in %s/apidocs-%s.tar.gz" % (base_dir, version)
-    print "They have also been uploaded to Sourceforge."
-    print "MANUAL STEPS:"
-    print "  1) Email archive to helpdesk at redhat.com"
-    print "  2) SSH to sourceforge and run apidocs.sh"
-    print ""    
-
+  os.chdir("%s/target/distribution" % workingDir)
+  ## Grab the distribution archive and un-arch it
+  subprocess.check_call(["unzip", "infinispan-%s-all.zip" % version])
+  os.chdir("infinispan-%s/doc" % version)
+  ## "Fix" the docs to use the appropriate analytics tracker ID
+  subprocess.check_call(["%s/bin/updateTracker.sh" % workingDir])
+  subprocess.check_call(["tar", "zcf", "%s/apidocs-%s.tar.gz" % (base_dir, version), "apidocs"])
+  ## Upload to sourceforge
+  os.chdir(base_dir)
+  subprocess.check_call(["scp", "apidocs-%s.tar.gz" % version, "sourceforge_frs:"])
+  print "API docs are in %s/apidocs-%s.tar.gz" % (base_dir, version)
+  print "They have also been uploaded to Sourceforge."
+  print "MANUAL STEPS:"
+  print "  1) Email archive to helpdesk at redhat.com"
+  print "  2) SSH to sourceforge and run apidocs.sh"
+  print ""    
+  
 ### This is the starting place for this script.
 def release():
-    # We start by determining whether the version passed in is a valid one
-    if len(sys.argv) < 2:
-        helpAndExit()
-    base_dir = os.getcwd()
-    version = validateVersion(sys.argv[1])
-    print "Releasing Infinispan version " + version
-    print "Please stand by!"
+  # We start by determining whether the version passed in is a valid one
+  if len(sys.argv) < 2:
+    helpAndExit()
+  base_dir = os.getcwd()
+  version = validateVersion(sys.argv[1])
+  print "Releasing Infinispan version " + version
+  print "Please stand by!"
+  
+  ## Release order:
+  # Step 1: Tag in SVN
+  newVersion = "%s/tags/%s" % (svnBase, version)
+  print "Step 1: Tagging trunk in SVN as %s" % newVersion    
+  tagInSubversion(version, newVersion)
+  print "Step 1: Complete"
+  
+  workingDir = localTagsDir + "/" + version
+    
+  # Step 2: Update version in tagged files
+  print "Step 2: Updating version number in source files"
+  updateVersions(version, workingDir)
+  print "Step 2: Complete"
+  
+  # Step 3: Build and test in Maven2
+  print "Step 3: Build and test in Maven2"
+  buildAndTest(workingDir)
+  print "Step 3: Complete"
+  
+  # Step 4: Check in to Maven2 repo
+  print "Step 4: Checking in to Maven2 Repo (this can take a while, go get coffee)"
+  checkInMaven2Repo(version, workingDir)
+  print "Step 4: Complete"
+  
+  # Step 5: Upload javadocs to FTP
+  print "Step 5: Uploading Javadocs"
+  uploadJavadocs(base_dir, workingDir, version)
+  print "Step 5: Complete"
+  
+  print "Step 6: Uploading to Sourceforge"
+  uploadArtifactsToSourceforge(version)
+  print "Step 6: Complete"
+  
+  # (future)
+  # Step 6: Update www.infinispan.org
+  # Step 7; Upload to SF.net
+  
+  print "\n\n\nDone!  Now all you need to do is:"
+  print "   1.  Update http://www.infinispan.org"
+  print "   2.  Update wiki pages with relevant information and links to docs, etc"
+  print "   3.  Login to the Sourceforge project admin page and mark the -bin.ZIP package as the default download for all platforms."
 
-    ## Release order:
-    # Step 1: Tag in SVN
-    newVersion = "%s/tags/%s" % (svnBase, version)
-    print "Step 1: Tagging trunk in SVN as %s" % newVersion    
-    tagInSubversion(version, newVersion)
-    print "Step 1: Complete"
 
-    workingDir = localTagsDir + "/" + version
-
-    # Step 2: Update version in tagged files
-    print "Step 2: Updating version number in source files"
-    updateVersions(version, workingDir)
-    print "Step 2: Complete"
-
-    # Step 3: Build and test in Maven2
-    print "Step 3: Build and test in Maven2"
-    buildAndTest(workingDir)
-    print "Step 3: Complete"
-
-    # Step 4: Check in to Maven2 repo
-    print "Step 4: Checking in to Maven2 Repo (this can take a while, go get coffee)"
-    checkInMaven2Repo(version, workingDir)
-    print "Step 4: Complete"
-
-    # Step 5: Upload javadocs to FTP
-    print "Step 5: Uploading Javadocs"
-    uploadJavadocs(base_dir, workingDir, version)
-    print "Step 5: Complete"
-
-    print "Step 6: Uploading to Sourceforge"
-    uploadArtifactsToSourceforge(version)
-    print "Step 6: Complete"
-
-    # (future)
-    # Step 6: Update www.infinispan.org
-    # Step 7; Upload to SF.net
-
-
-    print "\n\n\nDone!  Now all you need to do is:"
-    print "   1.  Update http://www.infinispan.org"
-    print "   2.  Update wiki pages with relevant information and links to docs, etc"
-    print "   3.  Login to the Sourceforge project admin page and mark the -bin.ZIP package as the default download for all platforms."
-
-
 if __name__ == "__main__":
     release()



More information about the infinispan-commits mailing list