mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better upload performance and UI for upload manual and to sourceforge
This commit is contained in:
parent
65bc2e13fe
commit
0842a7ba2d
@ -198,9 +198,8 @@ class UploadToGoogleCode(Command): # {{{
|
|||||||
|
|
||||||
# Now add the file itself
|
# Now add the file itself
|
||||||
file_name = os.path.basename(file_path)
|
file_name = os.path.basename(file_path)
|
||||||
f = open(file_path, 'rb')
|
with open(file_path, 'rb') as f:
|
||||||
file_content = f.read()
|
file_content = f.read()
|
||||||
f.close()
|
|
||||||
|
|
||||||
body.extend(
|
body.extend(
|
||||||
['--' + BOUNDARY,
|
['--' + BOUNDARY,
|
||||||
@ -265,7 +264,7 @@ class UploadToSourceForge(Command): # {{{
|
|||||||
if not os.path.exists(x): continue
|
if not os.path.exists(x): continue
|
||||||
start = time.time()
|
start = time.time()
|
||||||
self.info('Uploading', x)
|
self.info('Uploading', x)
|
||||||
check_call(['rsync', '-v', '-e', 'ssh -x', x,
|
check_call(['rsync', '-z', '--progress', '-e', 'ssh -x', x,
|
||||||
'%s,%s@frs.sourceforge.net:%s'%(self.USERNAME, self.PROJECT,
|
'%s,%s@frs.sourceforge.net:%s'%(self.USERNAME, self.PROJECT,
|
||||||
self.rdir+'/')])
|
self.rdir+'/')])
|
||||||
print 'Uploaded in', int(time.time() - start), 'seconds'
|
print 'Uploaded in', int(time.time() - start), 'seconds'
|
||||||
@ -376,7 +375,8 @@ class UploadUserManual(Command): # {{{
|
|||||||
for x in glob.glob(self.j(path, '*')):
|
for x in glob.glob(self.j(path, '*')):
|
||||||
self.build_plugin_example(x)
|
self.build_plugin_example(x)
|
||||||
|
|
||||||
check_call(' '.join(['scp', '-r', 'src/calibre/manual/.build/html/*',
|
check_call(' '.join(['rsync', '-z', '-r', '--progress',
|
||||||
|
'src/calibre/manual/.build/html/',
|
||||||
'bugs:%s'%USER_MANUAL]), shell=True)
|
'bugs:%s'%USER_MANUAL]), shell=True)
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user