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
a44ec8c6a8f6
Commit
a44ec8c6a8f6
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
split list_modules from docker_build_copy to be able to call it separately
parent
635c0ccad6dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker_build_copy
+1
-6
1 addition, 6 deletions
docker_build_copy
list_modules
+4
-21
4 additions, 21 deletions
list_modules
with
5 additions
and
27 deletions
docker_build_copy
+
1
−
6
View file @
a44ec8c6
...
@@ -19,12 +19,7 @@
...
@@ -19,12 +19,7 @@
# Copy modules when specified
# Copy modules when specified
if
[[
-n
"
$odoo_modules
"
]]
;
if
[[
-n
"
$odoo_modules
"
]]
;
then
then
if
type
"python3"
>
/dev/null
;
${
here
}
/list_modules
then
python3
-B
-c
"import configparser ; c = configparser.ConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
else
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
fi
mkdir
-p
$project_home
/odoo_modules
mkdir
-p
$project_home
/odoo_modules
set
-e
set
-e
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
...
...
This diff is collapsed.
Click to expand it.
docker_build_copy
→
list_modules
+
4
−
21
View file @
a44ec8c6
#!/bin/zsh
#!/bin/zsh
# TODO change to a pure python3 script installed with setup.py as an entrypoint
# vim: set shiftwidth=4 softtabstop=4:
# vim: set shiftwidth=4 softtabstop=4:
...
@@ -2,6 +3,6 @@
...
@@ -2,6 +3,6 @@
# vim: set shiftwidth=4 softtabstop=4:
# vim: set shiftwidth=4 softtabstop=4:
# Create
docker script (copy)
# Create
the file odoo_modules_list from setup.cfg
# template version 2.7
# template version 2.7
...
@@ -5,6 +6,5 @@
...
@@ -5,6 +6,5 @@
# template version 2.7
# template version 2.7
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
here
=
$(
dirname
$0
)
here
=
$(
dirname
$0
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
...
@@ -9,5 +9,4 @@
...
@@ -9,5 +9,4 @@
here
=
$(
dirname
$0
)
here
=
$(
dirname
$0
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
static_dir
=
$project_home
/static/
if
type
"python3"
>
/dev/null
;
if
type
"python3"
>
/dev/null
;
then
then
...
@@ -12,4 +11,4 @@
...
@@ -12,4 +11,4 @@
if
type
"python3"
>
/dev/null
;
if
type
"python3"
>
/dev/null
;
then
then
odoo_modules
=
"
$(
python3
-B
-c
"import configparser ; c = configparser.ConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print
(c.has_option('odoo_scripts', 'modules') and '
'.join(c.get('odoo_scripts', 'module
s
').split())
or '')"
)
"
python3
-B
-c
"import configparser ; c = configparser.ConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print
(',
'.join(c.get('odoo_scripts', 'module
_list
').split())
)
"
>
$project_home
/odoo_modules_list
else
else
...
@@ -15,3 +14,3 @@
...
@@ -15,3 +14,3 @@
else
else
odoo_modules
=
"
$(
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print
(c.has_option('odoo_scripts', 'modules') and '
'.join(c.get('odoo_scripts', 'module
s
').split())
or '')"
)
"
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print
(',
'.join(c.get('odoo_scripts', 'module
_list
').split())
)
"
>
$project_home
/odoo_modules_list
fi
fi
...
@@ -17,17 +16,1 @@
...
@@ -17,17 +16,1 @@
fi
fi
# Copy modules when specified
if
[[
-n
"
$odoo_modules
"
]]
;
then
if
type
"python3"
>
/dev/null
;
then
python3
-B
-c
"import configparser ; c = configparser.ConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
else
python2
-B
-c
"import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('
${
project_home
}
/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))"
>
$project_home
/odoo_modules_list
fi
mkdir
-p
$project_home
/odoo_modules
set
-e
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
# this only sync static from our modules
rsync
--include
=
'/*/static/***'
--exclude
=
'/*/*'
-r
--times
--prune-empty-dirs
$(
eval echo
$odoo_modules
)
$static_dir
fi
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