Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-tools by
Diff: export/__init__.py
- Revision:
- 4:395a265b9cd4
- Parent:
- 2:5f044fef8f98
--- a/export/__init__.py Wed Mar 30 20:14:58 2016 +0000
+++ b/export/__init__.py Thu Mar 31 00:18:15 2016 +0100
@@ -54,7 +54,7 @@
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
if target is not None:
target = target.upper()
@@ -111,8 +111,13 @@
# 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))
# copy .hgignore file to exported direcotry as well.
- copy(os.path.join(exporter.TEMPLATE_DIR,'.hgignore'),tempdir)
- zip_path = zip_working_directory_and_clean_up(tempdir, destination, project_name, clean)
+ if exists(os.path.join(exporter.TEMPLATE_DIR,'.hgignore')):
+ 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
