Make sure dist is created for the HEAD before uploading.

This commit is contained in:
Cheng Zhao 2013-06-29 11:36:02 +08:00
parent 02ba7d27b9
commit 0af724205c
2 changed files with 31 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import atexit
import contextlib
import errno
import shutil
import subprocess
@ -18,6 +19,16 @@ def tempdir(prefix=''):
return directory
@contextlib.contextmanager
def scoped_cwd(path):
cwd = os.getcwd()
os.chdir(path)
try:
yield
finally:
os.chdir(cwd)
def download(text, url, path):
with open(path, 'w') as local_file:
web_file = urllib2.urlopen(url)