mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot: overwrite duplicate addons
The web addon is supposed to be duplicate, and needs to be installed (in the enterprise version) over the community edition. A better fix would be to keep the folder and use the --addons-path key to start the server with the correct addon, but this is an urgent change. closes #69
This commit is contained in:
parent
d7edc2b0d5
commit
c3e2a6f72d
@ -648,15 +648,15 @@ class runbot_build(osv.osv):
|
||||
]
|
||||
|
||||
# move all addons to server addons path
|
||||
for module in set(glob.glob(build.path('addons/*')) + additional_modules):
|
||||
for module in uniq_list(glob.glob(build.path('addons/*')) + additional_modules):
|
||||
basename = os.path.basename(module)
|
||||
if not os.path.exists(build.server('addons', basename)):
|
||||
shutil.move(module, build.server('addons'))
|
||||
else:
|
||||
if os.path.exists(build.server('addons', basename)):
|
||||
build._log(
|
||||
'Building environment',
|
||||
'You have duplicate modules in your branches "%s"' % basename
|
||||
)
|
||||
shutil.rmtree(build.server('addons', basename))
|
||||
shutil.move(module, build.server('addons'))
|
||||
|
||||
def pg_dropdb(self, cr, uid, dbname):
|
||||
run(['dropdb', dbname])
|
||||
|
Loading…
Reference in New Issue
Block a user