[FIX] hw_drivers: Clean drivers folder before change branch

When we change the version of branch we keep drivers.
But drivers are not compatible with all branch and Odoo
on the IoT Box can't start.

So we remove all drivers before checkout on another branch

closes odoo/odoo#50140

X-original-commit: 4e97aec6717697c742e5e0b09f00ab7dec09712f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
lejeune quentin
2020-04-24 11:10:12 +00:00
parent b1a5bf95f8
commit 672323037a
+1
View File
@@ -79,6 +79,7 @@ def check_git_branch():
if db_branch != local_branch:
subprocess.check_call(["sudo", "mount", "-o", "remount,rw", "/"])
subprocess.check_call(["rm", "/home/pi/odoo/addons/hw_drivers/drivers/*"])
subprocess.check_call(git + ['branch', '-m', db_branch])
subprocess.check_call(git + ['remote', 'set-branches', 'origin', db_branch])
os.system('/home/pi/odoo/addons/point_of_sale/tools/posbox/configuration/posbox_update.sh')