Permalink
Browse files

Added scripts for releasing.

  • Loading branch information...
1 parent e53cec5 commit 677dbd6a3b9ac8c810a8294034dd82a30f989efa @rhauch rhauch committed Mar 25, 2011
Showing with 3,659 additions and 100 deletions.
  1. +18 −100 .gitignore
  2. +70 −0 bin/docbook.py
  3. +332 −0 bin/jira.py
  4. +2,176 −0 bin/markdown2.py
  5. +452 −0 bin/release.py
  6. +456 −0 bin/utils.py
  7. +155 −0 release_notes.md
View
@@ -1,107 +1,25 @@
+# ignore Maven generated target folders
+target
-# /
+# ignore eclipse files and folders
+.settings
+.scala_dependencies
+.externalToolBuilders
/.metadata
-/target
-
-/modeshape-parent/.settings
-/modeshape-parent/target
-
-/modeshape-assembly-descriptors/.settings
-/modeshape-assembly-descriptors/target
-
-/modeshape-distribution/.settings
-/modeshape-distribution/target
-
-/modeshape-common/.settings
-/modeshape-common/target
-
-/modeshape-graph/.settings
-/modeshape-graph/target
-
-/modeshape-cnd/.settings
-/modeshape-cnd/target
-
-/modeshape-integration-tests/.settings
-/modeshape-integration-tests/target
-
-/modeshape-search/.settings
-/modeshape-search/target
-
-/modeshape-jcr/.settings
-/modeshape-jcr/target
-
-/modeshape-jcr-api/.settings
-/modeshape-jcr-api/target
-
-/modeshape-jcr-tck/.settings
-/modeshape-jcr-tck/target
-
-/modeshape-repository/.settings
-/modeshape-repository/target
-
-/docs/target
-/docs/examples/gettingstarted/repositories/target
-/docs/examples/gettingstarted/sequencers/target
-/docs/gettingstarted/target
-/docs/presentations/*.key
-/docs/reference/target
-/docs/jdbc-guide/target
-
-/extensions/modeshape-web-jcr-rest/target/
-/extensions/modeshape-web-jcr-rest-war/target/
-
-/web/target/
-/web/modeshape-web-jcr/target/
-/web/modeshape-web-jcr-rest/target/
-/web/modeshape-web-jcr-rest-war/target/
-/web/modeshape-web-jcr-rest-client/target/
-/web/modeshape-web-jcr-webdav/target
-/web/modeshape-web-jcr-webdav-war/target/
-
-/utils/modeshape-jdbc-local/target/
-/utils/modeshape-jdbc/target/
-/utils/modeshape-jpa-ddl-gen/target/
-/utils/modeshape-unit-test/target/
+/RemoteSystemsTempFiles
-/deploy/jbossas/target/
-/deploy/jbossas/modeshape-jbossas-console/target/
-/deploy/jbossas/modeshape-jbossas-service/target/
-/deploy/jbossas/modeshape-jbossas-web-rest-war/target/
-/deploy/jbossas/modeshape-jbossas-web-webdav-war/target/
+# ignore IDEA files
+*.iml
+*.ipr
+*.iws
+.idea
+atlassian-ide-plugin.xml
-/extensions/modeshape-clustering/target
-/extensions/modeshape-search-lucene/target
-/extensions/modeshape-classloader-maven/target
-/extensions/modeshape-common-jdbc/target
-/extensions/modeshape-connector-federation/target
-/extensions/modeshape-connector-filesystem/target
-/extensions/modeshape-connector-inmemory/target
-/extensions/modeshape-connector-jbosscache/target
-/extensions/modeshape-connector-jcr/target
-/extensions/modeshape-connector-infinispan/target
-/extensions/modeshape-connector-jdbc-metadata/target
-/extensions/modeshape-connector-store-jpa/target
-/extensions/modeshape-connector-svn/target
-/extensions/modeshape-mimetype-detector-aperture/.settings
-/extensions/modeshape-mimetype-detector-aperture/target
-/extensions/modeshape-sequencer-classfile/target
-/extensions/modeshape-sequencer-cnd/target
-/extensions/modeshape-sequencer-ddl/target
-/extensions/modeshape-sequencer-esbMessage/target
-/extensions/modeshape-sequencer-images/target
-/extensions/modeshape-sequencer-java/target
-/extensions/modeshape-sequencer-jbpm-jpdl/target
-/extensions/modeshape-sequencer-mp3/target
-/extensions/modeshape-sequencer-msoffice/target
-/extensions/modeshape-sequencer-text/target
-/extensions/modeshape-sequencer-teiid/target
-/extensions/modeshape-sequencer-xml/target
-/extensions/modeshape-sequencer-zip/target
-/extensions/modeshape-extractor-tika/target
+# Compiled python files
+*.pyc
+# REST client module bin folder
/tools/org.modeshape.eclipse.jcr.rest.client/bin
-/sandbox/modeshape-test-reference-impl/target
-
-# Directory created by Eclipse
-/RemoteSystemsTempFiles
+# Presentation Keynote files
+/docs/presentations/*.key
View
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+import re
+import os
+from utils import *
+
+class DocBook(object):
+ '''Encapsulates JIRA access used when getting issues related to ModeShape release'''
+
+ def __init__(self, version):
+ self.version = version
+ self.modified_files = set()
+ try:
+ if settings['verbose']:
+ self.verbose = True
+ except:
+ self.verbose = False
+
+ def patch_docbooks_under(self,working_dir):
+ '''Replace all occurrences of the version in all documents' source, returning the list of files that were modified '''
+ for docbook in self.get_docbook_dirs(working_dir):
+ docbook_path = os.path.join(working_dir,docbook)
+ self.patch_docbook(docbook_path)
+ return self.modified_files
+
+ def get_docbook_dirs(self,working_dir):
+ dirname = working_dir #os.path.join(working_dir,'docs')
+ if self.verbose:
+ print "Looking for DocBook modules in project under %s" % dirname
+ return os.listdir(dirname)
+
+ def patch_docbook(self,doc_dir):
+ '''Replace all occurrences of the version in the document source'''
+ # Find the prior version ...
+ prior_version = self.get_docbook_prior_version(doc_dir)
+ if prior_version != None:
+ self.replace_all_occurrences(doc_dir,'*.xml',prior_version)
+ self.replace_all_occurrences(doc_dir,'*.dtd',prior_version)
+ return
+
+ def get_docbook_prior_version(self,doc_dir):
+ dtd_path = os.path.join(doc_dir,'src','main','docbook','en-US','custom.dtd')
+ if not os.path.exists(dtd_path):
+ return None
+ f = open(dtd_path)
+ content = f.read();
+ f.close()
+ # Find the version number ...
+ m = re.search(r"versionNumber\s+\"(.*?)\"",content)
+ if m:
+ return m.group(1)
+ return None
+
+ def replace_all_occurrences(self,doc_dir,pattern,prior_version):
+ walker = GlobDirectoryWalker(doc_dir, pattern)
+ for a_file in walker:
+ if walker.replace_all_in(a_file,prior_version,self.version):
+ self.modified_files.add(a_file)
+
+### This is the starting place for this script.
+def main():
+
+ print "Working DocBook ..."
+ version = '2.5.0.Beta1'
+ docbook = DocBook(version)
+ for modified_file in docbook.patch_docbooks_under('docs'):
+ print "Modified: %s" % (modified_file)
+
+if __name__ == "__main__":
+ main()
+
Oops, something went wrong.

0 comments on commit 677dbd6

Please sign in to comment.