summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlejeune quentin <qle@odoo.com>2020-04-23 10:47:45 +0000
committerlejeune quentin <qle@odoo.com>2020-04-24 11:10:12 +0000
commit672323037a4e4b63d2c5b579b1b52a2ae0155af3 (patch)
tree22cd0c2659bd70e4d6a2f17898f0436a301f3e9f
parentb1a5bf95f8ce26944959c97b760239d008efec95 (diff)
[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>
-rw-r--r--addons/hw_drivers/tools/helpers.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/hw_drivers/tools/helpers.py b/addons/hw_drivers/tools/helpers.py
index 0be09086e4d..0020cff2a4b 100644
--- a/addons/hw_drivers/tools/helpers.py
+++ b/addons/hw_drivers/tools/helpers.py
@@ -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')