Skip to content

Commit 05023a3

Browse files
author
libm
committed
Flush stdout to inform buildbot that it is not hang.
Added retry and let 'node-webkit-' bundle to be uploaded first.
1 parent 349afb2 commit 05023a3

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

tools/aws_uploader.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import datetime
55
import json
66
import os
7+
import sys
8+
import time
79

810

911
# Set timeout, for retry
@@ -53,24 +55,41 @@
5355
print 'Cannot find packages!'
5456
exit(-1)
5557

58+
# move node-webkit- to the top of the list.
59+
for i in range(len(file_list)):
60+
fname = file_list[i]
61+
if fname.startswith('node-webkit-v'):
62+
del file_list[i]
63+
file_list.insert(0,fname)
64+
break
5665

5766
def print_progress(transmitted, total):
5867
print ' %d%% transferred of total: %d bytes.' % (transmitted*100/total, total)
68+
sys.stdout.flush()
5969

6070

6171
def aws_upload(upload_path, file_list):
6272
conn = boto.connect_s3()
6373
print 'Connecting to S3 ...'
74+
sys.stdout.flush()
6475
bucket = conn.get_bucket(bucket_name)
6576
print 'Uploading to: ' + upload_path
6677
for f in file_list:
6778
print 'Uploading "' + f + '" ...'
79+
sys.stdout.flush()
6880
# use '/' for s3
6981
key = bucket.new_key(upload_path + '/' + f)
7082
key.set_contents_from_filename(filename=os.path.join(dist_dir, f), cb=print_progress, num_cb=50, replace=True)
7183

72-
aws_upload(upload_path, file_list)
73-
print 'Done.'
84+
for retry in range(3):
85+
try:
86+
aws_upload(upload_path, file_list)
87+
break
88+
except Exception, e:
89+
print e
90+
sys.stdout.flush()
91+
time.sleep(30) #wait for 30s and try again.
7492

93+
print 'Done.'
7594

7695
# vim: et:ts=4:sw=4

tools/package_binaries.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def generate_target_nw(platform_name, arch, version):
111111
'libGLESv2.dll',
112112
'nw.exe',
113113
'nw.pak',
114+
'nw.exp',
115+
'nw.lib',
114116
'nwsnapshot.exe',
115117
'credits.html',
116118
]

0 commit comments

Comments
 (0)