From 3bf5f94744688ec7352810a257d818a23aff97f4 Mon Sep 17 00:00:00 2001 From: Austin Blackstone Date: Fri, 13 Feb 2015 17:43:48 +0000 Subject: [PATCH 1/2] changed name from readme.html to GettingStarted.htm, changed web address from developer.mbed.org to mbed.org --- workspace_tools/export/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace_tools/export/__init__.py b/workspace_tools/export/__init__.py index bf1310fb66..5f52968d43 100755 --- a/workspace_tools/export/__init__.py +++ b/workspace_tools/export/__init__.py @@ -85,7 +85,7 @@ def export(project_path, project_name, ide, target, destination='/tmp/', zip_path = None if report['success']: # add readme file to every offline export. - open(os.path.join(tempdir, 'README.html'),'w').write(''% (target,ide)) + open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write(''% (ide)) zip_path = zip_working_directory_and_clean_up(tempdir, destination, project_name, clean) return zip_path, report From 9a6d8a9193f0a538eb8d05e18e65296a958980ee Mon Sep 17 00:00:00 2001 From: Austin Blackstone Date: Fri, 13 Feb 2015 20:02:04 +0000 Subject: [PATCH 2/2] added updated .hgignore file to exporters, the file is simply copied in from the .hgignore file int he export directory, this way the file itself can be updated in the future, not the script --- workspace_tools/export/.hgignore | 20 ++++++++++++++++++++ workspace_tools/export/__init__.py | 6 ++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 workspace_tools/export/.hgignore diff --git a/workspace_tools/export/.hgignore b/workspace_tools/export/.hgignore new file mode 100755 index 0000000000..a4e91129a7 --- /dev/null +++ b/workspace_tools/export/.hgignore @@ -0,0 +1,20 @@ +syntax: regexp +\.hgignore$ +\.git$ +\.svn$ +\.orig$ +\.msub$ +\.meta$ +\.ctags +\.uvproj$ +\.uvopt$ +\.project$ +\.cproject$ +\.launch$ +\.project$ +\.cproject$ +\.launch$ +Makefile$ +\.ewp$ +\.eww$ +\.htm$ \ No newline at end of file diff --git a/workspace_tools/export/__init__.py b/workspace_tools/export/__init__.py index 5f52968d43..85a960929c 100755 --- a/workspace_tools/export/__init__.py +++ b/workspace_tools/export/__init__.py @@ -16,7 +16,7 @@ limitations under the License. """ import os, tempfile from os.path import join, exists, basename -from shutil import copytree, rmtree +from shutil import copytree, rmtree, copy from workspace_tools.utils import mkdir from workspace_tools.export import uvision4, codesourcery, codered, gccarm, ds5_5, iar, emblocks, coide, kds @@ -85,7 +85,9 @@ def export(project_path, project_name, ide, target, destination='/tmp/', zip_path = None if report['success']: # add readme file to every offline export. - open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write(''% (ide)) + open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write(''% (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) return zip_path, report