Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
09d9dd3f
Commit
09d9dd3f
authored
2 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
prettier for Odoo 11
parent
eeeaf06e
No related branches found
No related tags found
1 merge request
!134
✨ prettier for Odoo 11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS.rst
+5
-0
5 additions, 0 deletions
NEWS.rst
odoo_scripts/docker_prettier.py
+13
-6
13 additions, 6 deletions
odoo_scripts/docker_prettier.py
with
18 additions
and
6 deletions
NEWS.rst
+
5
−
0
View file @
09d9dd3f
...
...
@@ -2,6 +2,11 @@
History
=======
16.8.0
------
Prettier for odoo 11.
16.7.3
------
...
...
This diff is collapsed.
Click to expand it.
odoo_scripts/docker_prettier.py
+
13
−
6
View file @
09d9dd3f
...
...
@@ -6,8 +6,8 @@
import
os
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_client
import
DockerClient
from
.parsing
import
apply
,
basic_parser
...
...
@@ -10,6 +10,6 @@
from
.docker_build
import
add_build_options
,
build_local_image
,
get_build_options
from
.docker_client
import
DockerClient
from
.parsing
import
apply
,
basic_parser
__version__
=
"
1.
0.1
"
__version__
=
"
1.
1.0
"
__date__
=
"
2022-02-17
"
...
...
@@ -15,5 +15,5 @@
__date__
=
"
2022-02-17
"
__updated__
=
"
2022-0
3-03
"
__updated__
=
"
2022-0
9-29
"
_logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -72,7 +72,14 @@
"""
Run prettier
"""
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
"
]
path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
pwd
,
directory
))
...
...
@@ -97,8 +104,8 @@
_logger
.
info
(
"
Running prettier in %s
"
,
path
)
return
DockerClient
.
run
(
config
.
local_
image
,
config
.
local_
tag
,
image
,
tag
,
{
"
entrypoint
"
:
"
prettier
"
,
"
user
"
:
os
.
getuid
(),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment