@@ -227,6 +227,13 @@ def sourceforge_web_synchro( sourceforge_project, doc_dir,
227
227
mput %s
228
228
exit""" % (doc_dir , ' ' .join (paths ) ), retry = 3 )
229
229
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
+
230
237
231
238
def main ():
232
239
usage = """%prog release_version next_dev_version
@@ -254,8 +261,10 @@ def main():
254
261
help = """Overwrite release existing tag if it exist. [Default: %default]""" )
255
262
parser .add_option ('-p' , '--platforms' , dest = "platforms" , action = 'store' , default = '' ,
256
263
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 ,
258
265
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.""" )
259
268
parser .add_option ('-u' , '--upload-user' , dest = "user" , action = 'store' ,
260
269
help = """Sourceforge user for SFTP documentation upload.""" )
261
270
parser .add_option ('--sftp' , dest = 'sftp' , action = 'store' , default = doxybuild .find_program ('psftp' , 'sftp' ),
@@ -329,11 +338,17 @@ def main():
329
338
svn_remove_tag ( tag_url , 'Removing tag due to failed testing' )
330
339
sys .exit (1 )
331
340
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'
335
350
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 .'
337
352
print 'Tarball can be found at:' , doc_tarball_path
338
353
#@todo:
339
354
#upload source & doc tarballs
0 commit comments