Skip to content
Snippets Groups Projects
Commit eac0261a authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:sparkles: also copy setup files to odoo_setup (removing symbolic links) so that it can...

:sparkles: also copy setup files to odoo_setup (removing symbolic links) so that it can be included in :whale: Dockerfiles
parent e6a8ed31
No related branches found
No related tags found
1 merge request!57Copy setup for dockerfile
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
History History
======= =======
11.0.0
------
docker_build_copy: Add the copy of setup files in directory odoo_setup so that they can be added to the Docker images of each projects.
10.0.1 10.0.1
------ ------
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
""" """
if os.path.exists(MODULES_LIST_FILE): if os.path.exists(MODULES_LIST_FILE):
os.remove(MODULES_LIST_FILE) os.remove(MODULES_LIST_FILE)
for directory in ("odoo_modules", "static"): for directory in ("odoo_modules", "static", "odoo_setup"):
if os.path.exists(directory): if os.path.exists(directory):
shutil.rmtree(directory) shutil.rmtree(directory)
......
...@@ -108,6 +108,28 @@ ...@@ -108,6 +108,28 @@
) )
_logger.debug(" ".join(cmd)) _logger.debug(" ".join(cmd))
call(cmd) call(cmd)
# copy setup files to odoo_setup
source = "setup/"
target = "odoo_setup"
if os.path.exists(source):
_logger.info("Copying Odoo %s files to %s", source, target)
if not os.path.exists(target):
os.mkdir(target)
cmd = [
"rsync",
"--delete",
"--cvs-exclude",
"--include=core",
"--exclude=.hg*",
"--exclude=.git*",
"--copy-links",
"--exclude='*.pyc'",
"-r",
"--times",
] + [source, target]
_logger.debug(" ".join(cmd))
call(cmd)
list_modules() list_modules()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment