You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/09/13 16:37:33 UTC
svn commit: r1170198 - in /subversion/trunk/tools/dist: release.py
templates/htaccess.ezt templates/nightly-candidates.ezt
templates/rc-candidates.ezt templates/stable-candidates.ezt
Author: hwright
Date: Tue Sep 13 14:37:32 2011
New Revision: 1170198
URL: http://svn.apache.org/viewvc?rev=1170198&view=rev
Log:
When posting candidate tarballs, take advantage of apache's FancyIndex option
to display the warning.
* tools/dist/release.py
(post_candidates): Put the warning text and the tarballs in the same
directory.
(move_to_dist): Remove unused variable.
(main): Update commandline options.
* tools/dist/templates/rc-candidates.ezt,
tools/dist/templates/stable-candidates.ezt,
tools/dist/templates/nightly-candidates.ezt:
Update text.
* tools/dist/templates/htaccess.ezt:
New.
Added:
subversion/trunk/tools/dist/templates/htaccess.ezt
Modified:
subversion/trunk/tools/dist/release.py
subversion/trunk/tools/dist/templates/nightly-candidates.ezt
subversion/trunk/tools/dist/templates/rc-candidates.ezt
subversion/trunk/tools/dist/templates/stable-candidates.ezt
Modified: subversion/trunk/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1170198&r1=1170197&r2=1170198&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Tue Sep 13 14:37:32 2011
@@ -452,17 +452,13 @@ def post_candidates(args):
target = os.path.join(os.getenv('HOME'), 'public_html', 'svn',
str(args.version))
- if args.code_name:
- dirname = args.code_name
- else:
- dirname = 'deploy'
-
- if not os.path.exists(target):
- os.makedirs(target)
+ 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,
- 'dirname' : dirname,
}
# Choose the right template text
@@ -476,12 +472,11 @@ def post_candidates(args):
template = ezt.Template()
template.parse(get_tmplfile(template_filename).read())
- template.generate(open(os.path.join(target, 'index.html'), 'w'), data)
+ template.generate(open(os.path.join(target, 'HEADER.html'), 'w'), data)
- logging.info('Moving tarballs to %s' % os.path.join(target, dirname))
- if os.path.exists(os.path.join(target, dirname)):
- shutil.rmtree(os.path.join(target, dirname))
- shutil.copytree(get_deploydir(args.base_dir), os.path.join(target, dirname))
+ template = ezt.Template()
+ template.parse(get_tmplfile('htaccess.ezt').read())
+ template.generate(open(os.path.join(target, '.htaccess'), 'w'), data)
#----------------------------------------------------------------------
@@ -529,12 +524,7 @@ def move_to_dist(args):
target = args.target
else:
target = os.path.join(os.getenv('HOME'), 'public_html', 'svn',
- str(args.version), 'deploy')
-
- if args.code_name:
- dirname = args.code_name
- else:
- dirname = 'deploy'
+ str(args.version))
logging.info('Moving %s to dist dir \'%s\'' % (str(args.version),
args.dist_dir) )
@@ -730,9 +720,6 @@ def main():
help='''The revision number to base the release on.''')
subparser.add_argument('--target',
help='''The full path to the destination.''')
- subparser.add_argument('--code-name',
- help='''A whimsical name for the release, used only for
- naming the download directory.''')
# The clean-dist subcommand
subparser = subparsers.add_parser('clean-dist',
@@ -755,9 +742,6 @@ def main():
help='''The release label, such as '1.7.0-alpha1'.''')
subparser.add_argument('--dist-dir',
help='''The directory to clean.''')
- subparser.add_argument('--code-name',
- help='''A whimsical name for the release, used only for
- naming the download directory.''')
subparser.add_argument('--target',
help='''The full path to the destination used in
'post-candiates'..''')
Added: subversion/trunk/tools/dist/templates/htaccess.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/htaccess.ezt?rev=1170198&view=auto
==============================================================================
--- subversion/trunk/tools/dist/templates/htaccess.ezt (added)
+++ subversion/trunk/tools/dist/templates/htaccess.ezt Tue Sep 13 14:37:32 2011
@@ -0,0 +1,5 @@
+IndexOptions +FancyIndexing +SuppressColumnSorting +SuppressHTMLPreamble
+ServerSignature Off
+AddType text/plain .asc .h.dist
+AddIcon (TGZ,/icons/compressed.gif) .tar.gz .tar.bz2
+AddIcon (ZIP,/icons/compressed.gif) .zip
Modified: subversion/trunk/tools/dist/templates/nightly-candidates.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/nightly-candidates.ezt?rev=1170198&r1=1170197&r2=1170198&view=diff
==============================================================================
--- subversion/trunk/tools/dist/templates/nightly-candidates.ezt (original)
+++ subversion/trunk/tools/dist/templates/nightly-candidates.ezt Tue Sep 13 14:37:32 2011
@@ -59,7 +59,4 @@ made available to users who rely on thei
packages.</p>
<p>If you want to help us test this distribution of Subversion, you
-can find the files <a href="[dirname]/">here</a>.</p>
-
-</body>
-</html>
+can find the files below.</p>
Modified: subversion/trunk/tools/dist/templates/rc-candidates.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/rc-candidates.ezt?rev=1170198&r1=1170197&r2=1170198&view=diff
==============================================================================
--- subversion/trunk/tools/dist/templates/rc-candidates.ezt (original)
+++ subversion/trunk/tools/dist/templates/rc-candidates.ezt Tue Sep 13 14:37:32 2011
@@ -57,7 +57,4 @@ clearly denotes that this is not the fin
purposes. And please don't do so until it has been publicly announced.</p>
<p>If you want to help us test this distribution of Subversion, you
-can find the files <a href="[dirname]/">here</a>.</p>
-
-</body>
-</html>
+can find the files below.</p>
Modified: subversion/trunk/tools/dist/templates/stable-candidates.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/stable-candidates.ezt?rev=1170198&r1=1170197&r2=1170198&view=diff
==============================================================================
--- subversion/trunk/tools/dist/templates/stable-candidates.ezt (original)
+++ subversion/trunk/tools/dist/templates/stable-candidates.ezt Tue Sep 13 14:37:32 2011
@@ -91,7 +91,4 @@ reputation as a packager and Subversion'
but only one will deserve it.</p>
<p>If you want to help us test this distribution of Subversion, you
-can find the files <a href="[dirname]/">here</a>.</p>
-
-</body>
-</html>
+can find the files below.</p>