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

pull/915/head
Austin Blackstone 2015-02-13 20:02:04 +00:00
parent 3bf5f94744
commit 9a6d8a9193
2 changed files with 24 additions and 2 deletions

View File

@ -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$

View File

@ -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('<meta http-equiv="refresh" content="0; url=http://mbed.org/handbook/ExportToOfflineToolchain#%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(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