You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ja...@apache.org on 2008/12/09 15:30:21 UTC
svn commit: r724711 - in /activemq/scripts: activemq-schema-copy.sh
copy_released.py
Author: janstey
Date: Tue Dec 9 06:30:20 2008
New Revision: 724711
URL: http://svn.apache.org/viewvc?rev=724711&view=rev
Log:
CAMEL-1167 - add script to deploy latest released camel manual
Added:
activemq/scripts/copy_released.py (with props)
Modified:
activemq/scripts/activemq-schema-copy.sh
Modified: activemq/scripts/activemq-schema-copy.sh
URL: http://svn.apache.org/viewvc/activemq/scripts/activemq-schema-copy.sh?rev=724711&r1=724710&r2=724711&view=diff
==============================================================================
--- activemq/scripts/activemq-schema-copy.sh (original)
+++ activemq/scripts/activemq-schema-copy.sh Tue Dec 9 06:30:20 2008
@@ -64,6 +64,7 @@
/usr/local/bin/python ~/activemq-scripts/copy_snapshot.py /www/people.apache.org/repo/m2-snapshot-repository/org/apache/camel/camel-manual /www/activemq.apache.org/camel/manual ".pdf"
/usr/local/bin/python ~/activemq-scripts/copy_snapshot.py /www/people.apache.org/repo/m2-snapshot-repository/org/apache/camel/camel-manual /www/activemq.apache.org/camel/manual ".html"
-
+/usr/local/bin/python ~/activemq-scripts/copy_released.py /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-manual/ /www/activemq.apache.org/camel/manual ".pdf"
+/usr/local/bin/python ~/activemq-scripts/copy_released.py /www/people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/camel/camel-manual/ /www/activemq.apache.org/camel/manual ".html"
Added: activemq/scripts/copy_released.py
URL: http://svn.apache.org/viewvc/activemq/scripts/copy_released.py?rev=724711&view=auto
==============================================================================
--- activemq/scripts/copy_released.py (added)
+++ activemq/scripts/copy_released.py Tue Dec 9 06:30:20 2008
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+
+# This script copies maven release files that publish to the m2 repository to a directory
+import fnmatch
+import os
+import sys
+import shutil
+
+def copy_released(src, dest, postfix):
+ match = '*' + postfix
+
+ for root, dirs, files in os.walk(src):
+ files.sort();
+ filename = 'NULL'
+ dirname = '';
+ for file in files:
+ if not fnmatch.fnmatch(file, match):
+ continue
+ if fnmatch.fnmatch(file, '*-SNAPSHOT*'):
+ continue
+ filename = file
+ # get the lastest xsd file
+ if filename == 'NULL':
+ continue
+ srcfile= os.path.join(root,filename)
+ destfile = os.path.join(dest,filename)
+ shutil.copyfile(srcfile,destfile)
+ # disable the output
+ # print 'copy %s to %s' %(srcfile, destfile);
+
+
+def main():
+ if len(sys.argv) < 4:
+ print 'copy_released.py SRC DES postfix'\
+ 'copy the last release file from SRC directory to DES directory which ends with the postfix'
+ sys.exit();
+ copy_released(sys.argv[1], sys.argv[2], sys.argv[3]);
+
+
+if __name__ == '__main__':
+ sys.exit(main())
Propchange: activemq/scripts/copy_released.py
------------------------------------------------------------------------------
svn:eol-style = native