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
03eebf201ccf
Commit
03eebf201ccf
authored
6 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
generate list of modules during copy (and clean it up)
parent
670e42c61ba4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker_build_clean
+7
-1
7 additions, 1 deletion
docker_build_clean
docker_build_copy
+7
-1
7 additions, 1 deletion
docker_build_copy
with
14 additions
and
2 deletions
docker_build_clean
+
7
−
1
View file @
03eebf20
...
...
@@ -8,9 +8,14 @@
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
here
=
$(
dirname
$0
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
odoo_modules
=
"
$(
python
-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', 'modules').split()) or '')"
)
"
if
type
"python3"
>
/dev/null
;
then
odoo_modules
=
"
$(
python3
-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', 'modules').split()) or '')"
)
"
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', 'modules').split()) or '')"
)
"
fi
# Delete odoo modules temp directory
if
[[
-n
$odoo_modules
]]
;
then
rm
-rf
$project_home
/odoo_modules
...
...
@@ -12,7 +17,8 @@
# Delete odoo modules temp directory
if
[[
-n
$odoo_modules
]]
;
then
rm
-rf
$project_home
/odoo_modules
rm
-f
$project_home
/odoo_modules_list
fi
This diff is collapsed.
Click to expand it.
docker_build_copy
+
7
−
1
View file @
03eebf20
...
...
@@ -8,8 +8,13 @@
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file
here
=
$(
dirname
$0
)
project_home
=
$(
cd
$here
&&
cd
..
&&
echo
$PWD
)
odoo_modules
=
"
$(
python
-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', 'modules').split()) or '')"
)
"
if
type
"python3"
>
/dev/null
;
then
odoo_modules
=
"
$(
python3
-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', 'modules').split()) or '')"
)
"
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', 'modules').split()) or '')"
)
"
fi
# Copy modules when specified
if
[[
-n
"
$odoo_modules
"
]]
;
then
...
...
@@ -12,7 +17,8 @@
# Copy modules when specified
if
[[
-n
"
$odoo_modules
"
]]
;
then
python
-c
"print(','.join(module_path.split('/')[-1] for module_path in '
$(
eval echo
$odoo_modules
)
'.split()))"
>
$project_home
/odoo_modules_list
mkdir
-p
$project_home
/odoo_modules
rsync
--delete
-C
--exclude
=
'.hg*'
--exclude
=
'.git*'
--links
--exclude
=
'*.pyc'
-r
--times
$(
eval echo
$odoo_modules
)
$project_home
/odoo_modules
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