Skip to content

Commit 8659710

Browse files
author
blep
committed
- added --no-web to skip upload to web site
- added automatic upload of source and documentation tarball on frs.sourceforge.net git-svn-id: https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp@132 1f120ed1-78a5-a849-adca-83f0a9e25bb6
1 parent 6ecc335 commit 8659710

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

makerelease.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ def sourceforge_web_synchro( sourceforge_project, doc_dir,
227227
mput %s
228228
exit""" % (doc_dir, ' '.join(paths) ), retry=3 )
229229

230+
def sourceforge_release_tarball( sourceforge_project, paths, user=None, sftp='sftp' ):
231+
userhost = '%s,%[email protected]' % (user, sourceforge_project)
232+
run_sftp_batch( userhost, sftp, """
233+
mput %s
234+
exit
235+
""" % (' '.join(paths),) )
236+
230237

231238
def main():
232239
usage = """%prog release_version next_dev_version
@@ -254,8 +261,10 @@ def main():
254261
help="""Overwrite release existing tag if it exist. [Default: %default]""")
255262
parser.add_option('-p', '--platforms', dest="platforms", action='store', default='',
256263
help="""Comma separated list of platform passed to scons for build check.""")
257-
parser.add_option('--no-test', dest="no_test", action='store', default=False,
264+
parser.add_option('--no-test', dest="no_test", action='store_true', default=False,
258265
help="""Skips build check.""")
266+
parser.add_option('--no-web', dest="no_web", action='store_true', default=False,
267+
help="""Do not update web site.""")
259268
parser.add_option('-u', '--upload-user', dest="user", action='store',
260269
help="""Sourceforge user for SFTP documentation upload.""")
261270
parser.add_option('--sftp', dest='sftp', action='store', default=doxybuild.find_program('psftp', 'sftp'),
@@ -329,11 +338,17 @@ def main():
329338
svn_remove_tag( tag_url, 'Removing tag due to failed testing' )
330339
sys.exit(1)
331340
if options.user:
332-
print 'Uploading documentation using user', options.user
333-
sourceforge_web_synchro( SOURCEFORGE_PROJECT, doc_distcheck_top_dir, user=options.user, sftp=options.sftp )
334-
print 'Completed documentatio upload'
341+
if not options.no_web:
342+
print 'Uploading documentation using user', options.user
343+
sourceforge_web_synchro( SOURCEFORGE_PROJECT, doc_distcheck_top_dir, user=options.user, sftp=options.sftp )
344+
print 'Completed documentation upload'
345+
print 'Uploading source and documentation tarballs for release using user', options.user
346+
sourceforge_release_tarball( SOURCEFORGE_PROJECT,
347+
[source_tarball_path, doc_tarball_path],
348+
user=options.user, sftp=options.sftp )
349+
print 'Source and doc release tarballs uploaded'
335350
else:
336-
print 'No upload user specified. Documentation was not upload.'
351+
print 'No upload user specified. Web site and download tarbal were not uploaded.'
337352
print 'Tarball can be found at:', doc_tarball_path
338353
#@todo:
339354
#upload source & doc tarballs

0 commit comments

Comments
 (0)