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

:sparkles: prettier for Odoo 11

parent eeeaf06e
No related branches found
No related tags found
1 merge request!134✨ prettier for Odoo 11
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
History History
======= =======
16.8.0
------
Prettier for odoo 11.
16.7.3 16.7.3
------ ------
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
import os import os
import sys import sys
from .config import Config from .config import ODOO_11, Config
from .docker_build import add_build_options, build_local_image, get_build_options from .docker_build import add_build_options, build_local_image, get_build_options
from .docker_client import DockerClient from .docker_client import DockerClient
from .parsing import apply, basic_parser from .parsing import apply, basic_parser
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
from .docker_build import add_build_options, build_local_image, get_build_options from .docker_build import add_build_options, build_local_image, get_build_options
from .docker_client import DockerClient from .docker_client import DockerClient
from .parsing import apply, basic_parser from .parsing import apply, basic_parser
__version__ = "1.0.1" __version__ = "1.1.0"
__date__ = "2022-02-17" __date__ = "2022-02-17"
...@@ -15,5 +15,5 @@ ...@@ -15,5 +15,5 @@
__date__ = "2022-02-17" __date__ = "2022-02-17"
__updated__ = "2022-03-03" __updated__ = "2022-09-29"
_logger = logging.getLogger(__name__) _logger = logging.getLogger(__name__)
...@@ -72,7 +72,14 @@ ...@@ -72,7 +72,14 @@
"""Run prettier""" """Run prettier"""
config = Config() config = Config()
build_local_image(build_options) if config.odoo_type == ODOO_11:
image = "quay.orus.io/xcgd/prettier"
tag = "2.5.1"
else:
# Only works on Odoo 13+ where prettier is in the image
build_local_image(build_options)
image = config.local_image
tag = config.local_tag
pwd = os.environ["PWD"] pwd = os.environ["PWD"]
path = os.path.abspath(os.path.join(pwd, directory)) path = os.path.abspath(os.path.join(pwd, directory))
...@@ -97,8 +104,8 @@ ...@@ -97,8 +104,8 @@
_logger.info("Running prettier in %s", path) _logger.info("Running prettier in %s", path)
return DockerClient.run( return DockerClient.run(
config.local_image, image,
config.local_tag, tag,
{ {
"entrypoint": "prettier", "entrypoint": "prettier",
"user": os.getuid(), "user": os.getuid(),
......
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