mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #8 from mjs-arm/botch-fixing
Fix merge of support for --source for exporters
commit
f28588c3c2
|
@ -55,7 +55,7 @@ def online_build_url_resolver(url):
|
||||||
|
|
||||||
|
|
||||||
def export(project_path, project_name, ide, target, destination='/tmp/',
|
def export(project_path, project_name, ide, target, destination='/tmp/',
|
||||||
tempdir=None, clean=True, extra_symbols=None, build_url_resolver=online_build_url_resolver):
|
tempdir=None, clean=True, extra_symbols=None, zip=True, build_url_resolver=online_build_url_resolver):
|
||||||
# Convention: we are using capitals for toolchain and target names
|
# Convention: we are using capitals for toolchain and target names
|
||||||
if target is not None:
|
if target is not None:
|
||||||
target = target.upper()
|
target = target.upper()
|
||||||
|
@ -131,8 +131,13 @@ def export(project_path, project_name, ide, target, destination='/tmp/',
|
||||||
# add readme file to every offline export.
|
# add readme file to every offline export.
|
||||||
open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write('<meta http-equiv="refresh" content="0; url=http://mbed.org/handbook/Getting-Started-mbed-Exporters#%s"/>'% (ide))
|
open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write('<meta http-equiv="refresh" content="0; url=http://mbed.org/handbook/Getting-Started-mbed-Exporters#%s"/>'% (ide))
|
||||||
# copy .hgignore file to exported direcotry as well.
|
# copy .hgignore file to exported direcotry as well.
|
||||||
copy(os.path.join(exporter.TEMPLATE_DIR,'.hgignore'),tempdir)
|
if exists(os.path.join(exporter.TEMPLATE_DIR,'.hgignore')):
|
||||||
zip_path = zip_working_directory_and_clean_up(tempdir, destination, project_name, clean)
|
copy(os.path.join(exporter.TEMPLATE_DIR,'.hgignore'),tempdir)
|
||||||
|
|
||||||
|
if zip:
|
||||||
|
zip_path = zip_working_directory_and_clean_up(tempdir, destination, project_name, clean)
|
||||||
|
else:
|
||||||
|
zip_path = destination
|
||||||
|
|
||||||
return zip_path, report
|
return zip_path, report
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue