[FIX] installation os before choose odoo version
This commit is contained in:
parent
7b5a3294ac
commit
e08b402f3a
2 changed files with 26 additions and 20 deletions
|
|
@ -57,6 +57,7 @@ cd ERPLibre
|
||||||
Support Ubuntu 20.04, 22.04, 24.04 and OSX. The installation duration is more than 30 minutes.
|
Support Ubuntu 20.04, 22.04, 24.04 and OSX. The installation duration is more than 30 minutes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
make install_os
|
||||||
make install_odoo_16
|
make install_odoo_16
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -423,18 +423,16 @@ class Update:
|
||||||
os.rename(addons_path, addons_path + "TEMP")
|
os.rename(addons_path, addons_path + "TEMP")
|
||||||
|
|
||||||
# TODO need to be force if installation path is all good, return True
|
# TODO need to be force if installation path is all good, return True
|
||||||
if self.config.is_in_installation:
|
if self.config.install_dev:
|
||||||
_logger.info("Installation.")
|
_logger.info("Installation.")
|
||||||
status = self.install_erplibre(
|
status = self.install_erplibre()
|
||||||
install_system=self.config.install,
|
|
||||||
install_dev=self.config.install_dev,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Re-update if launch installation
|
# Re-update if launch installation
|
||||||
self._update_directory_to_link(
|
if self.config.install_dev:
|
||||||
VENV_FILE, self.expected_venv_name
|
self._update_directory_to_link(
|
||||||
)
|
VENV_FILE, self.expected_venv_name
|
||||||
# self._update_directory_to_link(ADDONS_PATH, self.expected_addons_name)
|
)
|
||||||
|
# self._update_directory_to_link(ADDONS_PATH, self.expected_addons_name)
|
||||||
elif self.config.is_in_switch:
|
elif self.config.is_in_switch:
|
||||||
_logger.info("Switch")
|
_logger.info("Switch")
|
||||||
self.execute_log.append(f"System update")
|
self.execute_log.append(f"System update")
|
||||||
|
|
@ -487,15 +485,14 @@ class Update:
|
||||||
return
|
return
|
||||||
os.system("./.venv/bin/python ./script/ide/pycharm_configuration.py --init")
|
os.system("./.venv/bin/python ./script/ide/pycharm_configuration.py --init")
|
||||||
|
|
||||||
def install_erplibre(self, install_system=False, install_dev=False):
|
def install_erplibre(self):
|
||||||
status = 0
|
self.execute_log.append(f"Dev installation")
|
||||||
|
status = os.system("./script/install/install_locally_dev.sh")
|
||||||
|
return status
|
||||||
|
|
||||||
if install_system:
|
def install_system(self):
|
||||||
self.execute_log.append(f"System installation")
|
self.execute_log.append(f"System installation")
|
||||||
status = os.system("./script/install/install_dev.sh")
|
status = os.system("./script/install/install_dev.sh")
|
||||||
if install_dev and not status:
|
|
||||||
self.execute_log.append(f"Dev installation")
|
|
||||||
status = os.system("./script/install/install_locally_dev.sh")
|
|
||||||
return status
|
return status
|
||||||
|
|
||||||
def update_link_file(
|
def update_link_file(
|
||||||
|
|
@ -688,12 +685,20 @@ def main():
|
||||||
update.validate_version()
|
update.validate_version()
|
||||||
|
|
||||||
_logger.info("Validate environment")
|
_logger.info("Validate environment")
|
||||||
status = update.validate_environment()
|
status = 0
|
||||||
if update.config.force_install or not status:
|
if update.config.install_dev or update.config.is_in_switch:
|
||||||
|
status = update.validate_environment()
|
||||||
|
if update.config.install:
|
||||||
|
status = update.install_system()
|
||||||
|
if (
|
||||||
|
update.config.force_install
|
||||||
|
or update.config.install_dev
|
||||||
|
or update.config.is_in_switch
|
||||||
|
) and not status:
|
||||||
update.update_environment()
|
update.update_environment()
|
||||||
update.print_log()
|
update.print_log()
|
||||||
|
|
||||||
if update.config.is_in_installation:
|
if update.config.install_dev:
|
||||||
# Update pycharm configuration
|
# Update pycharm configuration
|
||||||
update.pycharm_update()
|
update.pycharm_update()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue