activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r663498 - in /activemq/scripts: activemq-schema-copy.sh copy_released_xsd.py copy_snapshot.py
Date Thu, 05 Jun 2008 08:36:53 GMT
Author: ningjiang
Date: Thu Jun  5 01:36:53 2008
New Revision: 663498

URL: http://svn.apache.org/viewvc?rev=663498&view=rev
Log:
CAMEL-545 Added the script to copy the camel released schema

Added:
    activemq/scripts/copy_released_xsd.py   (with props)
Modified:
    activemq/scripts/activemq-schema-copy.sh
    activemq/scripts/copy_snapshot.py

Modified: activemq/scripts/activemq-schema-copy.sh
URL: http://svn.apache.org/viewvc/activemq/scripts/activemq-schema-copy.sh?rev=663498&r1=663497&r2=663498&view=diff
==============================================================================
--- activemq/scripts/activemq-schema-copy.sh (original)
+++ activemq/scripts/activemq-schema-copy.sh Thu Jun  5 01:36:53 2008
@@ -33,10 +33,17 @@
 # Copy the released schema
 cp /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-spring/*/*.xsd
$OUT_DIR/spring/
 
-# TODO - uncomment when we have released 1.3.0
-#cp /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-osgi/*/*.xsd
$OUT_DIR/osgi/
+cp /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-osgi/*/*.xsd
$OUT_DIR/osgi/
 
-#cp /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-cxf/*/*.xsd
$OUT_DIR/cxfEndpoint/
+cp /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-cxf/*/*.xsd
$OUT_DIR/cxfEndpoint/
+
+# Update the default schema with the latest released schema
+
+/usr/local/bin/python ~/activemq-scripts/copy_released_xsd.py $OUT_DIR/spring camel-spring.xsd
+
+/usr/local/bin/python ~/activemq-scripts/copy_released_xsd.py $OUT_DIR/osgi camel-osgi.xsd
+
+/usr/local/bin/python ~/activemq-scripts/copy_released_xsd.py $OUT_DIR/cxfEndpoint camel-cxf.xsd
 
 
 # Copy the snapshot schema

Added: activemq/scripts/copy_released_xsd.py
URL: http://svn.apache.org/viewvc/activemq/scripts/copy_released_xsd.py?rev=663498&view=auto
==============================================================================
--- activemq/scripts/copy_released_xsd.py (added)
+++ activemq/scripts/copy_released_xsd.py Thu Jun  5 01:36:53 2008
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+
+# This script copys the camel snapshot xsd files that publish to the m2 repository to the
+# camel web site
+import fnmatch
+import os
+import sys
+import shutil
+
+def copy_latest_released_xsds(src, target):
+    for root, dirs, files in os.walk(src):
+        files.sort();
+        filename = 'NULL'
+        dirname = '';
+        for file in files:
+            # skip the none xsd file
+            if not fnmatch.fnmatch(file, '*.xsd'):
+                continue
+            # skip the snapshot file
+            if fnmatch.fnmatch(file, '*-SNAPSHOT.xsd'):
+                continue
+            # we don't want copy the target file
+            if file != target :
+                filename = file
+
+        # get the lastest released xsd file
+        if filename == 'NULL':
+            continue
+
+        srcfile= os.path.join(root, filename)
+        destfile = os.path.join(root, target)
+
+        shutil.copyfile(srcfile,destfile)
+
+
+def main():
+    if len(sys.argv) < 3:
+        print 'copy_released_xsd.py SRC TARGET'\
+              'copy the last released xsd file from SRC directory to the TARGET file in SRC
directory'
+        sys.exit();
+    copy_latest_released_xsds(sys.argv[1], sys.argv[2]);
+
+
+if __name__ == '__main__':
+  sys.exit(main())

Propchange: activemq/scripts/copy_released_xsd.py
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/scripts/copy_snapshot.py
URL: http://svn.apache.org/viewvc/activemq/scripts/copy_snapshot.py?rev=663498&r1=663497&r2=663498&view=diff
==============================================================================
--- activemq/scripts/copy_snapshot.py (original)
+++ activemq/scripts/copy_snapshot.py Thu Jun  5 01:36:53 2008
@@ -38,7 +38,7 @@
 
 def main():
     if len(sys.argv) < 4:
-        print 'copy_snapshot_xsd.py SRC DES postfix'\
+        print 'copy_snapshot.py SRC DES postfix'\
               'copy the last snapshot file from SRC directory to DES directory which ends
with the postfix'\
               'with the file name end with SNAPSHOT.postfix'
         sys.exit();



Mime
View raw message