@@ -55,7 +55,7 @@ def online_build_url_resolver(url):
55
55
56
56
57
57
def export (project_path , project_name , ide , target , destination = '/tmp/' ,
58
- tempdir = None , clean = True , extra_symbols = None , build_url_resolver = online_build_url_resolver ):
58
+ tempdir = None , clean = True , extra_symbols = None , zip = True , build_url_resolver = online_build_url_resolver ):
59
59
# Convention: we are using capitals for toolchain and target names
60
60
if target is not None :
61
61
target = target .upper ()
@@ -131,8 +131,13 @@ def export(project_path, project_name, ide, target, destination='/tmp/',
131
131
# add readme file to every offline export.
132
132
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 ))
133
133
# copy .hgignore file to exported direcotry as well.
134
- copy (os .path .join (exporter .TEMPLATE_DIR ,'.hgignore' ),tempdir )
135
- zip_path = zip_working_directory_and_clean_up (tempdir , destination , project_name , clean )
134
+ if exists (os .path .join (exporter .TEMPLATE_DIR ,'.hgignore' )):
135
+ copy (os .path .join (exporter .TEMPLATE_DIR ,'.hgignore' ),tempdir )
136
+
137
+ if zip :
138
+ zip_path = zip_working_directory_and_clean_up (tempdir , destination , project_name , clean )
139
+ else :
140
+ zip_path = destination
136
141
137
142
return zip_path , report
138
143
0 commit comments