You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/03/22 13:58:56 UTC

svn commit: r1303763 - in /subversion/trunk/tools/dist: release.py templates/htaccess.ezt templates/rc-candidates.ezt templates/stable-candidates.ezt

Author: stsp
Date: Thu Mar 22 12:58:56 2012
New Revision: 1303763

URL: http://svn.apache.org/viewvc?rev=1303763&view=rev
Log:
* tools/dev/release.py
  (post_candidates): Commit candidates to dist.apache.org instead of
    generating a candidates website.

* templates/rc-candidates.ezt,
  templates/stable-candidates.ezt,
  templates/htaccess.ezt: Remove, these are now unused.

Removed:
    subversion/trunk/tools/dist/templates/htaccess.ezt
    subversion/trunk/tools/dist/templates/rc-candidates.ezt
    subversion/trunk/tools/dist/templates/stable-candidates.ezt
Modified:
    subversion/trunk/tools/dist/release.py

Modified: subversion/trunk/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1303763&r1=1303762&r2=1303763&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Thu Mar 22 12:58:56 2012
@@ -445,39 +445,16 @@ def roll_tarballs(args):
 # Post the candidate release artifacts
 
 def post_candidates(args):
-    'Post the generated tarballs to web-accessible directory.'
-    if args.target:
-        target = args.target
-    else:
-        target = os.path.join(os.getenv('HOME'), 'public_html', 'svn',
-                              str(args.version))
-
-    logging.info('Moving tarballs to %s' % target)
-    if os.path.exists(target):
-        shutil.rmtree(target)
-    shutil.copytree(get_deploydir(args.base_dir), target)
-
-    data = { 'version'      : str(args.version),
-             'revnum'       : args.revnum,
-           }
-
-    # Choose the right template text
-    if args.version.is_prerelease():
-        if args.version.pre == 'nightly':
-            template_filename = 'nightly-candidates.ezt'
-        else:
-            template_filename = 'rc-candidates.ezt'
-    else:
-        template_filename = 'stable-candidates.ezt'
-
-    template = ezt.Template()
-    template.parse(get_tmplfile(template_filename).read())
-    template.generate(open(os.path.join(target, 'HEADER.html'), 'w'), data)
-
-    template = ezt.Template()
-    template.parse(get_tmplfile('htaccess.ezt').read())
-    template.generate(open(os.path.join(target, '.htaccess'), 'w'), data)
+    'Post candidate artifacts to the dist development directory.'
 
+    target_url = 'https://dist.apache.org/repos/dist/dev/subversion'
+    logging.info('Importing tarballs to %s' % target_url)
+    proc = subprocess.Popen(['svn', 'import', '-m',
+                             'Add %s candidate release artifacts' 
+                               % args.version.base,
+                            get_deploydir(args.base_dir), target_url])
+    (stdout, stderr) = proc.communicate()
+    proc.wait()
 
 #----------------------------------------------------------------------
 # Clean dist