[UPD] script: move script git, manifest, database, poetry, install

- refactor script emplacement
- update all reference
This commit is contained in:
Mathieu Benoit 2023-01-02 20:33:57 -05:00
parent 541a09fa3a
commit 7ed6939907
67 changed files with 182 additions and 215 deletions

126
Makefile
View file

@ -63,25 +63,25 @@ install:install_os install_dev
.PHONY: install_dev
install_dev:
./script/install_locally_dev.sh
./script/install/install_locally_dev.sh
# Install this for the first time of dev environment
.PHONY: install_os
install_os:
./script/install_dev.sh
./script/install/install_dev.sh
.PHONY: install_production
install_production:
./script/install_dev.sh
./script/install_production.sh
./script/install/install_dev.sh
./script/install/install_production.sh
.PHONY: install_docker_debian
install_docker_debian:
./script/ install_debian_10_prod_docker.sh
./script/install/install_debian_10_prod_docker.sh
.PHONY: install_docker_ubuntu
install_docker_ubuntu:
./script/install_ubuntu_docker.sh
./script/install/install_ubuntu_docker.sh
#####################
# DB installation #
@ -128,54 +128,54 @@ db_drop_test:
.PHONY: db_clean_cache
db_clean_cache:
./script/db_restore.py --clean_cache
./script/database/db_restore.py --clean_cache
.PHONY: db_restore_erplibre_base_db_test
db_restore_erplibre_base_db_test:
./script/db_restore.py --database test
./script/database/db_restore.py --database test
.PHONY: db_restore_erplibre_base_db_test_module_test
db_restore_erplibre_base_db_test_module_test:
./script/db_restore.py --database test
./script/database/db_restore.py --database test
./script/addons/install_addons.sh test test
.PHONY: db_restore_prod_client
db_restore_prod_client:
# You need to put the database backup in ./image_db/prod_client.zip
./script/db_restore.py --database prod_client --image prod_client
./script/migrate_prod_to_test.sh prod_client
./script/database/db_restore.py --database prod_client --image prod_client
./script/database/migrate_prod_to_test.sh prod_client
.PHONY: db_restore_erplibre_base_db_test_image_test
db_restore_erplibre_base_db_test_image_test:
./script/db_restore.py --database test --image test
./script/database/db_restore.py --database test --image test
.PHONY: db_restore_erplibre_base_db_test2
db_restore_erplibre_base_db_test2:
./script/db_restore.py --database test2
./script/database/db_restore.py --database test2
.PHONY: db_restore_erplibre_base_db_test3
db_restore_erplibre_base_db_test3:
./script/db_restore.py --database test3
./script/database/db_restore.py --database test3
.PHONY: db_restore_erplibre_website_db_test
db_restore_erplibre_website_db_test:
./script/db_restore.py --database test --image erplibre_website
./script/database/db_restore.py --database test --image erplibre_website
.PHONY: db_restore_erplibre_website_chat_crm_db_test
db_restore_erplibre_website_chat_crm_db_test:
./script/db_restore.py --database test --image erplibre_website_chat_crm
./script/database/db_restore.py --database test --image erplibre_website_chat_crm
.PHONY: db_restore_erplibre_ecommerce_base_db_test
db_restore_erplibre_ecommerce_base_db_test:
./script/db_restore.py --database test --image erplibre_ecommerce_base
./script/database/db_restore.py --database test --image erplibre_ecommerce_base
.PHONY: db_restore_erplibre_base_db_code_generator
db_restore_erplibre_base_db_code_generator:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
.PHONY: db_restore_erplibre_base_db_template
db_restore_erplibre_base_db_template:
./script/db_restore.py --database template
./script/database/db_restore.py --database template
.PHONY: db_create_db_test
db_create_db_test:
@ -377,7 +377,7 @@ image_db_create_erplibre_package_wiki:
.PHONY: image_db_create_all
image_db_create_all:
#./script/make.sh config_gen_image_db
./script/db_restore.py --clean_cache
./script/database/db_restore.py --clean_cache
./script/make.sh image_db_create_erplibre_base
./script/make.sh image_db_create_erplibre_website
./script/make.sh image_db_create_erplibre_code_generator
@ -403,13 +403,13 @@ image_db_create_all:
.PHONY: image_db_create_all_parallel
image_db_create_all_parallel:
./script/db_restore.py --clean_cache
./script/database/db_restore.py --clean_cache
./script/make.sh image_db_create_erplibre_base
parallel < ./conf/image_db_create.txt
.PHONY: image_db_create_test_website_attachments
image_db_create_test_website_attachments:
./script/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments
./script/database/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments
# Do your stuff
./.venv/bin/python3 ./odoo/odoo-bin --limit-time-real 999999 --no-http -c config.conf --stop-after-init -d code_generator_test_website_attachements -u all
./.venv/bin/python3 ./odoo/odoo-bin db --backup --database code_generator_test_website_attachements --restore_image test_website_attachments
@ -424,33 +424,33 @@ image_diff_base_website:
#########################
.PHONY: addons_install_code_generator_basic
addons_install_code_generator_basic:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator
.PHONY: addons_install_code_generator_featured
addons_install_code_generator_featured:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_cron,code_generator_hook,code_generator_portal
.PHONY: addons_install_code_generator_full
addons_install_code_generator_full:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_cron,code_generator_hook,code_generator_portal,code_generator_db_servers,code_generator_website_snippet,code_generator_geoengine,code_generator_theme_website,code_generator_website_leaflet
.PHONY: addons_install_code_generator_demo
addons_install_code_generator_demo:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_demo
.PHONY: addons_install_all_code_generator_demo
addons_install_all_code_generator_demo:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
# TODO ignore code_generator_demo_internal cause (demo_internal, demo_model_2_internal_view_form) already exists
./script/addons/install_addons_dev.sh code_generator code_generator_demo,code_generator_demo_export_helpdesk,code_generator_demo_export_website,code_generator_demo_internal_inherit,code_generator_demo_portal,code_generator_demo_theme_website,code_generator_demo_website_leaflet,code_generator_demo_website_snippet,code_generator_auto_backup
# Conflict between code_generator_demo_website_multiple_snippet and code_generator_demo_internal_inherit
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_demo_website_multiple_snippet
./script/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments
./script/database/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments
./script/addons/install_addons_dev.sh code_generator_test_website_attachements code_generator_demo_export_website_attachments
#./script/addons/install_addons_dev.sh code_generator code_generator_demo
@ -467,7 +467,7 @@ addons_install_all_code_generator_demo:
.PHONY: addons_install_all_code_generator_template
addons_install_all_code_generator_template:
./script/db_restore.py --database template
./script/database/db_restore.py --database template
./script/addons/install_addons_dev.sh template demo_portal,auto_backup,demo_internal_inherit
./script/addons/install_addons_dev.sh template code_generator_template_demo_portal,code_generator_template_demo_sysadmin_cron,code_generator_template_demo_internal_inherit
@ -499,7 +499,7 @@ addons_install_all_code_generator_template:
.PHONY: addons_install_all_generated_demo
addons_install_all_generated_demo:
./script/db_restore.py --database template
./script/database/db_restore.py --database template
./script/addons/install_addons_dev.sh template demo_helpdesk_data,demo_website_data,demo_internal,demo_internal_inherit,demo_portal,demo_website_leaflet,demo_website_snippet,auto_backup
./script/addons/install_addons_theme.sh template theme_website_demo_code_generator
#./script/addons/install_addons_dev.sh template demo_helpdesk_data
@ -517,7 +517,7 @@ addons_install_all_generated_demo:
##################
.PHONY: addons_install_code_generator_template_code_generator
addons_install_code_generator_template_code_generator:
./script/db_restore.py --database template
./script/database/db_restore.py --database template
./script/code_generator/search_class_model.py --quiet -d addons/TechnoLibre_odoo-code-generator/code_generator -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_code_generator --with_inherit
./script/maintenance/black.sh ./addons/TechnoLibre_odoo-code-generator-template/code_generator_template_code_generator
./script/addons/install_addons_dev.sh template code_generator
@ -526,7 +526,7 @@ addons_install_code_generator_template_code_generator:
.PHONY: addons_install_code_generator_code_generator
addons_install_code_generator_code_generator:
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_code_generator
./script/git/remote_code_generation_git_compare.py --quiet --git_gui --clear --replace_directory --directory1 ./addons/TechnoLibre_odoo-code-generator/code_generator --directory2 ./addons/TechnoLibre_odoo-code-generator-template/code_generator
@ -546,16 +546,16 @@ meld_code_generator_code_generator:
.PHONY: addons_install_code_generator_mariadb_sql_example_1
addons_install_code_generator_mariadb_sql_example_1:
./script/database/restore_mariadb_sql_example_1.sh
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_portal
./script/addons/install_addons_dev.sh code_generator code_generator_migrator_demo_mariadb_sql_example_1
./script/db_restore.py --database template
./script/database/db_restore.py --database template
./script/addons/install_addons_dev.sh template code_generator_portal,demo_mariadb_sql_example_1
./script/code_generator/search_class_model.py --quiet -d addons/TechnoLibre_odoo-code-generator-template/demo_mariadb_sql_example_1 -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_demo_mariadb_sql_example_1
./script/addons/install_addons_dev.sh template code_generator_template_demo_mariadb_sql_example_1
./script/db_restore.py --database code_generator
./script/database/db_restore.py --database code_generator
./script/addons/install_addons_dev.sh code_generator code_generator_portal
./script/addons/install_addons_dev.sh code_generator code_generator_demo_mariadb_sql_example_1
@ -623,7 +623,7 @@ test_code_generator_hello_world:
.PHONY: test_installation_demo
test_installation_demo:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/db_restore.py --database test_demo
./script/database/db_restore.py --database test_demo
./script/addons/install_addons.sh test_demo demo_helpdesk_data,demo_internal,demo_internal_inherit,demo_mariadb_sql_example_1,demo_portal,demo_website_data,demo_website_leaflet,demo_website_snippet
./script/addons/install_addons_theme.sh test_demo theme_website_demo_code_generator
@ -632,18 +632,18 @@ test_code_generator_generation:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/code_generator/check_git_change_code_generator.sh ./addons/OCA_server-tools/auto_backup
# Multiple
./script/db_restore.py --database test_code_generator
./script/database/db_restore.py --database test_code_generator
./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo,code_generator_demo_export_helpdesk,code_generator_demo_export_website,code_generator_demo_internal,code_generator_demo_portal,code_generator_demo_theme_website,code_generator_demo_website_leaflet,code_generator_demo_website_snippet ./addons/TechnoLibre_odoo-code-generator-template code_generator_demo,demo_helpdesk_data,demo_website_data,demo_internal,demo_portal,theme_website_demo_code_generator,demo_website_leaflet,demo_website_snippet
# inherit
# TODO should be in multiple list, need to support it
./script/db_restore.py --database test_code_generator
./script/database/db_restore.py --database test_code_generator
./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_internal_inherit ./addons/TechnoLibre_odoo-code-generator-template demo_internal_inherit
# auto_backup
./script/db_restore.py --database test_code_generator
./script/database/db_restore.py --database test_code_generator
./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_auto_backup ./addons/OCA_server-tools/auto_backup auto_backup
# Single
#./script/db_restore.py --database test_code_generator
#./script/database/db_restore.py --database test_code_generator
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo ./addons/TechnoLibre_odoo-code-generator-template code_generator_demo
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_export_helpdesk ./addons/TechnoLibre_odoo-code-generator-template demo_helpdesk_data
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_export_website ./addons/TechnoLibre_odoo-code-generator-template demo_website_data
@ -652,9 +652,9 @@ test_code_generator_generation:
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_theme_website ./addons/TechnoLibre_odoo-code-generator-template theme_website_demo_code_generator
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_website_leaflet ./addons/TechnoLibre_odoo-code-generator-template demo_website_leaflet
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_website_snippet ./addons/TechnoLibre_odoo-code-generator-template demo_website_snippet
#./script/db_restore.py --database test_code_generator
#./script/database/db_restore.py --database test_code_generator
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_internal_inherit ./addons/TechnoLibre_odoo-code-generator-template demo_internal_inherit
#./script/db_restore.py --database test_code_generator
#./script/database/db_restore.py --database test_code_generator
#./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_auto_backup ./addons/OCA_server-tools/auto_backup auto_backup
.PHONY: test_code_generator_generation_template
@ -666,7 +666,7 @@ test_code_generator_generation_template:
.PHONY: test_code_generator_code_template_demo_portal
test_code_generator_code_template_demo_portal:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/db_restore.py --database test_template
./script/database/db_restore.py --database test_template
./script/addons/install_addons_dev.sh test_template demo_portal
#./script/addons/install_addons_dev.sh test_template code_generator_template_demo_portal
./script/code_generator/search_class_model.py --quiet -d addons/TechnoLibre_odoo-code-generator-template/demo_portal -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_demo_portal --with_inherit
@ -675,7 +675,7 @@ test_code_generator_code_template_demo_portal:
.PHONY: test_code_generator_code_template_demo_internal_inherit
test_code_generator_code_template_demo_internal_inherit:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/db_restore.py --database test_template
./script/database/db_restore.py --database test_template
./script/addons/install_addons_dev.sh test_template demo_internal_inherit
#./script/addons/install_addons_dev.sh test_template code_generator_template_demo_internal_inherit
./script/code_generator/search_class_model.py --quiet -d addons/TechnoLibre_odoo-code-generator-template/demo_internal_inherit -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_demo_internal_inherit --with_inherit
@ -684,7 +684,7 @@ test_code_generator_code_template_demo_internal_inherit:
.PHONY: test_code_generator_code_template_demo_sysadmin_cron
test_code_generator_code_template_demo_sysadmin_cron:
./script/code_generator/check_git_change_code_generator.sh ./addons/OCA_server-tools/auto_backup
./script/db_restore.py --database test_template
./script/database/db_restore.py --database test_template
./script/addons/install_addons_dev.sh test_template auto_backup
#./script/addons/install_addons_dev.sh test_template code_generator_template_demo_sysadmin_cron
./script/code_generator/search_class_model.py --quiet -d addons/OCA_server-tools/auto_backup -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_demo_sysadmin_cron --with_inherit
@ -694,7 +694,7 @@ test_code_generator_code_template_demo_sysadmin_cron:
test_code_generator_migrator_demo_mariadb_sql_example_1:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/database/restore_mariadb_sql_example_1.sh
./script/db_restore.py --database test_code_generator
./script/database/db_restore.py --database test_code_generator
./script/addons/install_addons_dev.sh test_code_generator code_generator_portal
#./script/addons/install_addons_dev.sh test_code_generator code_generator_migrator_demo_mariadb_sql_example_1
./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_migrator_demo_mariadb_sql_example_1 ./addons/TechnoLibre_odoo-code-generator-template demo_mariadb_sql_example_1
@ -702,7 +702,7 @@ test_code_generator_migrator_demo_mariadb_sql_example_1:
.PHONY: test_code_generator_template_demo_mariadb_sql_example_1
test_code_generator_template_demo_mariadb_sql_example_1:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/db_restore.py --database test_template
./script/database/db_restore.py --database test_template
./script/addons/install_addons_dev.sh test_template code_generator_portal,demo_mariadb_sql_example_1
./script/code_generator/search_class_model.py --quiet -d addons/TechnoLibre_odoo-code-generator-template/demo_mariadb_sql_example_1 -t addons/TechnoLibre_odoo-code-generator-template/code_generator_template_demo_mariadb_sql_example_1 --with_inherit
#./script/addons/install_addons_dev.sh test_template code_generator_template_demo_mariadb_sql_example_1
@ -711,7 +711,7 @@ test_code_generator_template_demo_mariadb_sql_example_1:
.PHONY: test_code_generator_demo_mariadb_sql_example_1
test_code_generator_demo_mariadb_sql_example_1:
./script/code_generator/check_git_change_code_generator.sh ./addons/TechnoLibre_odoo-code-generator-template
./script/db_restore.py --database test_code_generator
./script/database/db_restore.py --database test_code_generator
./script/addons/install_addons_dev.sh test_code_generator code_generator_portal
#./script/addons/install_addons_dev.sh test_code_generator code_generator_demo_mariadb_sql_example_1
./script/code_generator/install_and_test_code_generator.sh test_code_generator code_generator_demo_mariadb_sql_example_1 ./addons/TechnoLibre_odoo-code-generator-template demo_mariadb_sql_example_1
@ -752,7 +752,7 @@ test_addons_code_generator:
test_addons_code_generator_code_generator:
# TODO this test only generation, not test
./.venv/bin/coverage erase
./script/db_restore.py --database test_addons_code_generator_code_generator
./script/database/db_restore.py --database test_addons_code_generator_code_generator
./test.sh --dev all -d test_addons_code_generator_code_generator --db-filter test_addons_code_generator_code_generator -i code_generator_code_generator
./.venv/bin/coverage combine -a
./.venv/bin/coverage report -m --include="addons/TechnoLibre_odoo-code-generator/*"
@ -770,7 +770,7 @@ open_test_coverage:
#########
.PHONY: tag_push_all
tag_push_all:
./script/tag_push_all.py
./script/git/tag_push_all.py
##############
# terminal #
@ -838,7 +838,7 @@ log_show_test:
###########
.PHONY: clean_code_generator_template
clean_code_generator_template:
./script/repo_revert_git_diff_date_from_code_generator.py
./script/git/repo_revert_git_diff_date_from_code_generator.py
.PHONY: clean_test
clean_test:
@ -914,17 +914,17 @@ docker_clean_all:
# clear all repo DANGER
.PHONY: repo_clear_all
repo_clear_all:
./script/clean_repo_manifest.sh
./script/git/clean_repo_manifest.sh
# configure all repo
.PHONY: repo_configure_all
repo_configure_all:
./script/update_manifest_local_dev.sh
./script/manifest/update_manifest_local_dev.sh
# configure only group code_generator
.PHONY: repo_configure_group_code_generator
repo_configure_group_code_generator:
./script/update_manifest_local_dev_code_generator.sh
./script/manifest/update_manifest_local_dev_code_generator.sh
# Show git status for all repo
.PHONY: repo_show_status
@ -934,27 +934,27 @@ repo_show_status:
# Show divergence between actual repository and production manifest
.PHONY: repo_diff_manifest_production
repo_diff_manifest_production:
./script/git_show_code_diff_repo_manifest.py
./script/git/git_show_code_diff_repo_manifest.py
# Show git diff for all repo from last tag version release
.PHONY: repo_diff_from_last_version
repo_diff_from_last_version:
./script/repo_diff_last_version.sh
./script/git/repo_diff_last_version.sh
# Show git diff statistique for all repo from last tag version release
.PHONY: repo_diff_stat_from_last_version
repo_diff_stat_from_last_version:
./script/repo_diff_stat_last_version.sh
./script/git/repo_diff_stat_last_version.sh
# change all repo to ssh on all remote
.PHONY: repo_use_all_ssh
repo_use_all_ssh:
./script/git_change_remote_https_to_git.py
./script/git/git_change_remote_https_to_git.py
# change all repo to https on all remote
.PHONY: repo_use_all_https
repo_use_all_https:
./script/git_change_remote_https_to_git.py --git_to_https
./script/git/git_change_remote_https_to_git.py --git_to_https
###################
# Configuration #
@ -967,19 +967,19 @@ config_install:
# generate config all repo
.PHONY: config_gen_all
config_gen_all:
./script/git_repo_update_group.py
./script/git/git_repo_update_group.py
./script/generate_config.sh
# generate config repo code_generator
.PHONY: config_gen_code_generator
config_gen_code_generator:
./script/git_repo_update_group.py --group base,code_generator
./script/git/git_repo_update_group.py --group base,code_generator
./script/generate_config.sh
# generate config repo image_db
.PHONY: config_gen_image_db
config_gen_image_db:
./script/git_repo_update_group.py --group base,image_db
./script/git/git_repo_update_group.py --group base,image_db
./script/generate_config.sh
##########

View file

@ -26,9 +26,9 @@ make run
```
## Easy way to run docker
First, install dependencies to run docker, check script `./script/install_ubuntu_docker.sh`. You need docker and docker-compose.
First, install dependencies to run docker, check script `./script/install/install_ubuntu_docker.sh`. You need docker and docker-compose.
The docker volume is binded to the directory name, therefore create a unique directory name and run:
The docker volume is bound to the directory name, therefore create a unique directory name and run:
```bash
wget https://raw.githubusercontent.com/ERPLibre/ERPLibre/v1.4.0/docker-compose.yml
docker-compose up -d

View file

@ -589,7 +589,7 @@ Supposons que le nom de votre BD est `test_website` :
```bash
./.venv/bin/python3 ./odoo/odoo-bin db --backup --database test_website --restore_image test_website_backup
./script/db_restore.py --database test_website_2 --image test_website_backup.zip --clean_cache
./script/database/db_restore.py --database test_website_2 --image test_website_backup.zip --clean_cache
```
Un fichier temporaire `./image_db/test_website_backup.zip` a été créé, vous pouvez aller l'effacer.

View file

@ -403,7 +403,7 @@ Supposons que le nom de votre BD est `test_website` :
```bash
./.venv/bin/python3 ./odoo/odoo-bin db --backup --database test_website --restore_image test_website_backup
./script/db_restore.py --database test_website_2 --image test_website_backup.zip --clean_cache
./script/database/db_restore.py --database test_website_2 --image test_website_backup.zip --clean_cache
```
Un fichier temporaire `./image_db/test_website_backup.zip` a été créé, vous pouvez aller l'effacer.

View file

@ -14,8 +14,8 @@ git clone https://github.com/ERPLibre/ERPLibre.git
```bash
cd ERPLibre
./script/install_dev.sh
./script/install_locally_dev.sh
./script/install/install_dev.sh
./script/install/install_locally_dev.sh
```
### 3. Run ERPLibre
@ -27,15 +27,15 @@ cd ERPLibre
## Develop in Odoo repository
You need to remove `clone-depth="10"` from `./manifest/default.dev.xml` in order to be able to commit and push. Make a
temporary commit and regenerate with `./script/install_locally_dev.sh`
temporary commit and regenerate with `./script/install/install_locally_dev.sh`
## Fork project to create a new project independent from ERPLibre (deprecated)
## Fork project to create a new project independent of ERPLibre (deprecated)
ERPLibre was created with this script. It's now deprecated. Use this script when you need to fork directly from the
original source. Don't use this script if you want to update from ERPLibre and follow mainstream development.
```bash
./script/fork_project.py --github_token GITHUB_KEY --organization NAME
./script/git/fork_project.py --github_token GITHUB_KEY --organization NAME
```
# Fork all repos for you own organization
@ -46,7 +46,7 @@ personal account and choose your user name.
This command will fork all repos and ERPLibre to your own organization. It keeps track of ERPLibre.
```bash
./script/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
./script/git/fork_project_ERPLibre.py --github_token GITHUB_KEY --organization NAME
```
## Generate manifest from csv repo
@ -56,7 +56,7 @@ Add repo in file [./source_repo_addons.csv](./source_repo_addons.csv)
Execute to generate Repo manifest
```bash
./script/fork_project_ERPLibre.py --skip_fork
./script/git/fork_project_ERPLibre.py --skip_fork
```
## Move database from prod to dev
@ -68,7 +68,7 @@ When moving database from prod to your dev environment, you want to remove email
in order to test the database. Run:
```bash
./script/migrate_prod_to_test.sh DATABASE
./script/database/migrate_prod_to_test.sh DATABASE
```
## Change git url https to Git
@ -76,7 +76,7 @@ in order to test the database. Run:
This will update all urls in Git format:
```bash
./script/git_change_remote_https_to_git.py
./script/git/git_change_remote_https_to_git.py
```
## Showing repo differences between projects
@ -84,7 +84,7 @@ This will update all urls in Git format:
Tools to display the differences between the repo and another project.
```bash
./script/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
./script/git/git_change_remote.py --sync_to /path/to/project/erplibre --dry_sync
```
## Showing repo differences with manifest develop
@ -92,7 +92,7 @@ Tools to display the differences between the repo and another project.
To understand the divergences with the dev manifest.
```bash
./script/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
```
## Sync repo with another project
@ -101,7 +101,7 @@ Tools to synchronise the repo with another project. This will show differences a
all repos.
```bash
./script/git_change_remote.py --sync_to /path/to/project/erplibre
./script/git/git_change_remote.py --sync_to /path/to/project/erplibre
```
## Compare two files manifests
@ -109,7 +109,7 @@ all repos.
To show differences between commits in different manifests
```bash
./script/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
./script/git/git_diff_repo_manifest.py --input1 ./manifest/MANIFEST1.xml --input2 ./manifest/MANIFEST2.xml
```
## Differences between code and manifest
@ -117,7 +117,7 @@ To show differences between commits in different manifests
To show differences between actual code and manifest
```bash
./script/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
./script/git/git_show_code_diff_repo_manifest.py --manifest ./manifest/MANIFEST1.xml
```
## Add repo
@ -127,19 +127,19 @@ To access a new repo, add your URL to file [source_repo_addons.csv](../source_re
Fork the repo to be able to push new code:
```bash
./script/fork_project_ERPLibre.py
./script/git/fork_project_ERPLibre.py
```
To regenerate only manifest.xml.
```bash
./script/fork_project_ERPLibre.py --skip_fork
./script/git/fork_project_ERPLibre.py --skip_fork
```
Check if manifest contains "auto_install" and change the value to False.
```bash
./script/repo_remove_auto_install.py
./script/git/repo_remove_auto_install.py
```
## Filter repo by group
@ -147,7 +147,7 @@ Check if manifest contains "auto_install" and change the value to False.
Only keep repo tagged by group 'base' and 'code_generator'
```bash
./script/update_manifest_local_dev_code_generator.sh
./script/manifest/update_manifest_local_dev_code_generator.sh
```
# Execution
@ -157,14 +157,14 @@ Only keep repo tagged by group 'base' and 'code_generator'
You can limit your addons in ERPlibre config file depending on a group of your actual manifest.
```bash
./script/git_repo_update_group.py --group base,code_generator
./script/git/git_repo_update_group.py --group base,code_generator
./script/generate_config.sh
```
Or go back to normal
```bash
./script/git_repo_update_group.py
./script/git/git_repo_update_group.py
./script/generate_config.sh
```
@ -216,7 +216,7 @@ to version 3.7.16 .
Run the installation, `make install_dev`.
Update poetry, `./script/poetry_update.py`.
Update poetry, `./script/poetry/poetry_update.py`.
Create docker, `make docker_build`.
@ -225,7 +225,7 @@ Create docker, `make docker_build`.
## Show all pull requests from organization
```bash
/script/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
/script/git/pull_request_ERPLibre.py --github_token ### --organization ERPLibre
```
# Commit

View file

@ -14,8 +14,8 @@ git clone https://github.com/ERPLibre/ERPLibre.git
```bash
cd ERPLibre
./script/install_dev.sh
./script/install_locally_dev.sh
./script/install/install_dev.sh
./script/install/install_locally_dev.sh
```
### 3. Run ERPLibre
@ -31,11 +31,11 @@ To access a new repo, add your URL to file [source_repo_addons.csv](../source_re
Execute script:
```bash
./script/git_repo_manifest.py
./script/git/git_repo_manifest.py
git checkout -b NEW_BRANCH
git commit -am "Add new repo"
./script/install_locally_dev.sh
./script/poetry_update.py
./script/install/install_locally_dev.sh
./script/poetry/poetry_update.py
```
[Update your repo.](./GIT_REPO.md)

View file

@ -63,7 +63,7 @@ When dev contains specific revision with default revision, you need to replace d
keep specific version:
```bash
./script/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
./script/git/git_merge_repo_manifest.py --input1 ./manifest/default.dev.xml --input2 ./default.xml --output ./manifest/default.staged.xml
git commit -am "Updated manifest/default.staged.xml"
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
@ -117,11 +117,11 @@ Before cleaning, check changed file in all repos.
Check the changed branch, and push changed if needed.
```bash
./script/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
./script/git/git_show_code_diff_repo_manifest.py -m ./manifest/default.dev.xml
```
Maybe, some version diverge from your manifest. Simply clean all and relaunch your installation.
```bash
./script/clean_repo_manifest.sh
./script/git/clean_repo_manifest.sh
```

View file

@ -5,7 +5,7 @@
Add your dependencies in file [requirements.txt](../requirements.txt) and run script
```bash
./script/poetry_update.py
./script/poetry/poetry_update.py
```
This will search all `requirements.txt` files and update `pyproject.toml` and it will update poetry
@ -29,8 +29,8 @@ artifacts: `rm -rf artifacts/` and rerun the update.
## Upgrade Poetry
Change version in file `./script/install_locally.sh` into constant `POETRY_VERSION`.
Change version in file `./script/install/install_locally.sh` into constant `POETRY_VERSION`.
Erase directory `~/.poetry` and `./get-poetry.py`.
Run installation script for OS, check `./script/install_locally.sh`.
Run installation script for OS, check `./script/install/install_locally.sh`.

View file

@ -38,22 +38,22 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
#### Ubuntu 18.04 server
```bash
./script/install_dev.sh
./script/install_production.sh
./script/install/install_dev.sh
./script/install/install_production.sh
```
A service is runned by SystemD. You can access it with the DNS name found in `env_var.sh`
A service is running by SystemD. You can access it with the DNS name found in `env_var.sh`
#### Ubuntu 20.04 server
Apply fix libpng12-0: https://www.linuxuprising.com/2018/05/fix-libpng12-0-missing-in-ubuntu-1804.html
```bash
./script/install_dev.sh
./script/install_production.sh
./script/install/install_dev.sh
./script/install/install_production.sh
```
A service is runned by SystemD, you can access it with the DNS name found in `env_var.sh`
A service is running by SystemD, you can access it with the DNS name found in `env_var.sh`
### 4. SSL:
@ -101,7 +101,7 @@ When moving prod database to your dev environment, you want to remove email serv
database. WARNING, this is not safe for production, you will expose all data. Run:
```bash
./script/migrate_prod_to_test.sh DATABASE
./script/database/migrate_prod_to_test.sh DATABASE
```
## Update production
@ -125,7 +125,7 @@ Edit this file to accept interface from all networks:
CAUTION, this will delete user's home, it's irrevocable.
```bash
./script/delete_production.sh
./script/database/delete_production.sh
```
# Update ip when public ip change with CloudFlare and crontab

View file

@ -8,19 +8,19 @@ Before the cleaning, check if existing file isn't committed, not pushed or in st
```bash
./.venv/repo forall -pc "git stash list"
./script/git_show_code_diff_repo_manifest.py
./script/git/git_show_code_diff_repo_manifest.py
```
This will erase everything in addons. Useful before creating docker, manifest and do a release.
```bash
./script/clean_repo_manifest.sh
./script/git/clean_repo_manifest.sh
```
And update all from dev to merge into prod.
```bash
./script/install_locally_dev.sh
./script/install/install_locally_dev.sh
```
## Validate environment
@ -91,8 +91,8 @@ make image_db_create_all
To test it, you need to clean caches and install it:
```bash
./script/db_restore.py --clean_cache
./script/db_restore.py --database test --image erplibre_website
./script/database/db_restore.py --clean_cache
./script/database/db_restore.py --database test --image erplibre_website
```
## Generate new prod and release
@ -109,10 +109,11 @@ and [docker-compose](../docker-compose.yml).
Generate [poetry](./POETRY.md) and keep only missing dependencies, remove updates.
```bash
./script/poetry_update.py
./script/poetry/poetry_update.py
```
When running script poetry_update.py, note manually inserted dependencies, stash all changes and add it manually.
When running script ./script/poetry/poetry_update.py, note manually inserted dependencies, stash all changes and add it
manually.
```bash
poetry add DEPENDENCY
@ -195,5 +196,5 @@ CHANGELOG.md.
To generate a list of differences between repo git commit
```bash
./script/git_change_remote.py --sync_to /path/to/directory
./script/git/git_change_remote.py --sync_to /path/to/directory
```

View file

@ -8,20 +8,20 @@ The update is possible on branch 12.0, you need to verify this branch existence.
regenerate.
```bash
./script/clean_repo_manifest.sh
./script/install_locally_dev.sh
./script/git/clean_repo_manifest.sh
./script/install/install_locally_dev.sh
```
2. Update all remote with ssh/git
```bash
./script/git_change_remote_https_to_git.py
./script/git/git_change_remote_https_to_git.py
```
3. Run update script
```bash
./script/git_update_repo.py
./script/git/git_update_repo.py
```
4. Do a forced push on all needed repo and manage rebase conflicts.

View file

@ -34,7 +34,7 @@ RUN cd $ODOO_PREFIX && \
chmod +x ./.venv/repo
RUN cd $ODOO_PREFIX && \
./script/update_manifest_dev.sh
./script/manifest/update_manifest_dev.sh
# Install Poetry
RUN cd $ODOO_PREFIX && \

View file

@ -23,4 +23,3 @@ EL_WEBSITE_NAME="localhost"
EL_GITHUB_TOKEN=""
EL_MANIFEST_PROD="./default.xml"
EL_MANIFEST_DEV="./manifest/default.dev.xml"
EL_MANIFEST_EXP="./manifest/default.experimental.xml"

View file

@ -37,7 +37,7 @@ if [[ $retVal -ne 0 ]]; then
fi
# TODO check output when got warning
./script/repo_revert_git_diff_date_from_code_generator.py --repo "$3"
./script/git/repo_revert_git_diff_date_from_code_generator.py --repo "$3"
# Remove pot and po diff
cd "$3" || exit 1
# git 2.22 and more, else use next command

View file

@ -37,7 +37,7 @@ if [[ $retVal -ne 0 ]]; then
fi
# TODO check output when got warning
./script/repo_revert_git_diff_date_from_code_generator.py --repo "$3"
./script/git/repo_revert_git_diff_date_from_code_generator.py --repo "$3"
# Remove pot and po diff
cd "$3" || exit 1
# git 2.22 and more, else use next command

View file

@ -320,7 +320,7 @@ class ProjectManagement:
config_path = self.update_config()
bd_name_demo = f"new_project_code_generator_demo_{uuid.uuid4()}"[:63]
cmd = f"./script/db_restore.py --database {bd_name_demo}"
cmd = f"./script/database/db_restore.py --database {bd_name_demo}"
_logger.info(cmd)
os.system(cmd)
_logger.info("========= GENERATE code_generator_demo =========")
@ -371,7 +371,7 @@ class ProjectManagement:
bd_name_template = (
f"new_project_code_generator_template_{uuid.uuid4()}"[:63]
)
cmd = f"./script/db_restore.py --database {bd_name_template}"
cmd = f"./script/database/db_restore.py --database {bd_name_template}"
os.system(cmd)
_logger.info(cmd)
_logger.info(f"========= GENERATE {self.template_name} =========")
@ -426,7 +426,7 @@ class ProjectManagement:
_logger.info(f"Module cg exists '{cg_path}'")
bd_name_generator = f"new_project_code_generator_{uuid.uuid4()}"[:63]
cmd = f"./script/db_restore.py --database {bd_name_generator}"
cmd = f"./script/database/db_restore.py --database {bd_name_generator}"
_logger.info(cmd)
os.system(cmd)
_logger.info(f"========= GENERATE {self.cg_name} =========")

View file

@ -7,7 +7,7 @@ import sys
from code_writer import CodeWriter
from script.git_tool import GitTool
from script.git.git_tool import GitTool
# import tokenize

View file

@ -7,7 +7,7 @@ from xml.dom import Node, minidom
from code_writer import CodeWriter
from script.git_tool import GitTool
from script.git.git_tool import GitTool
def get_config():

View file

@ -4,7 +4,7 @@ This section is for code generator database migrator.
This configuration is for development environnement.
You need to install script `./script/install_dev_extra_ubuntu.sh`.
You need to install script `./script/install/install_dev_extra_ubuntu.sh`.
## Restore database

View file

@ -3,10 +3,6 @@ import argparse
import csv
import logging
import os
import sys
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(new_path)
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))

View file

@ -7,9 +7,6 @@ import os
import sys
from subprocess import check_output
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(new_path)
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
_logger = logging.getLogger(__name__)

View file

@ -11,7 +11,7 @@ new_path = os.path.normpath(
)
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

0
script/git/__init__.py Normal file
View file

4
script/fork_project.py → script/git/fork_project.py Normal file → Executable file
View file

@ -7,11 +7,11 @@ import sys
from git import Repo
from retrying import retry # pip install retrying
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script import fork_github_repo
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)
CST_EL_GITHUB_TOKEN = "EL_GITHUB_TOKEN"

View file

@ -7,10 +7,10 @@ import sys
import git
from git import Repo
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)
CST_EL_GITHUB_TOKEN = "EL_GITHUB_TOKEN"

View file

@ -7,10 +7,10 @@ import sys
from git import Repo
from retrying import retry # pip install retrying
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script import git_tool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)
CST_EL_GITHUB_TOKEN = "EL_GITHUB_TOKEN"
@ -22,7 +22,7 @@ def get_config():
:return: dict of config file settings and command line arguments
"""
config = git_tool.GitTool.get_project_config()
config = GitTool.get_project_config()
# TODO update description
parser = argparse.ArgumentParser(
@ -83,14 +83,14 @@ def main():
if config.generate_only_generate_config:
print("Generate config file locally.")
gt = git_tool.GitTool()
gt = GitTool()
gt.generate_generate_config()
return
if config.sync_to:
if config.sync_to[-1] != "/":
config.sync_to += "/"
gt = git_tool.GitTool()
gt = GitTool()
result = gt.get_matching_repo(
repo_compare_to=config.sync_to,
force_normalize_compare=True,
@ -100,7 +100,7 @@ def main():
return
# repo_root = Repo(".")
lst_repo = git_tool.GitTool.get_repo_info(repo_path=config.dir)
lst_repo = GitTool.get_repo_info(repo_path=config.dir)
i = 0
total = len(lst_repo)
for repo in lst_repo:
@ -112,7 +112,7 @@ def main():
organization_name = "ERPLibre"
if config.open_web_browser:
git_tool.GitTool.open_repo_web_browser(repo.get("url_https"))
GitTool.open_repo_web_browser(repo.get("url_https"))
# Create the remote upstream
split_url = url.split("/")

View file

@ -9,10 +9,10 @@ import sys
from git import Repo
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -6,10 +6,10 @@ import sys
from git import Repo
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -5,10 +5,10 @@ import logging
import os
import sys
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -4,10 +4,10 @@ import logging
import os
import sys
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -7,10 +7,10 @@ import sys
import git
from git import Repo
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -9,10 +9,10 @@ from colorama import Fore, Style
from git import Repo
from git.exc import GitCommandError, NoSuchPathError
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -7,10 +7,10 @@ import sys
from git import Repo # pip install gitpython
from retrying import retry # pip install retrying
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -4,10 +4,10 @@ import logging
import os
import sys
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)
CST_EL_GITHUB_TOKEN = "EL_GITHUB_TOKEN"

View file

@ -8,10 +8,10 @@ from pathlib import Path
from git import Repo # pip install gitpython
from git.exc import GitCommandError
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -8,7 +8,7 @@ import sys
import git
from unidiff import PatchSet
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
logging.basicConfig(

View file

@ -8,10 +8,10 @@ from colorama import Fore, Style
from git import Repo # pip install gitpython
from retrying import retry # pip install retrying
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))
sys.path.append(new_path)
from script.git_tool import GitTool
from script.git.git_tool import GitTool
_logger = logging.getLogger(__name__)

View file

@ -6,17 +6,17 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then
if [[ "${OS}" == "Ubuntu" ]]; then
if [[ "${VERSION}" == Ubuntu\ 18.04* || "${VERSION}" == Ubuntu\ 20.04* || "${VERSION}" == Ubuntu\ 22.04* ]]; then
echo "\n---- linux-gnu installation process started ----"
./script/install_debian_dependency.sh
./script/install/install_debian_dependency.sh
else
echo "Your version is not supported, only support 18.04, 20.04 and 22.04 : ${VERSION}"
fi
elif [[ "${OS}" == "Debian" ]]; then
./script/install_debian_dependency.sh
./script/install/install_debian_dependency.sh
else
./script/install_debian_dependency.sh
./script/install/install_debian_dependency.sh
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04."
fi
elif [[ "${OSTYPE}" == "darwin"* ]]; then
echo "\n---- Darwin installation process started ----"
./script/install_OSX_dependency.sh
./script/install/install_OSX_dependency.sh
fi

View file

@ -2,15 +2,15 @@
. ./env_var.sh
./script/install_locally.sh
./script/install/install_locally.sh
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error ./script/install_locally.sh"
echo "Error ./script/install/install_locally.sh"
exit 1
fi
# Update git-repo
./script/update_manifest_local_dev.sh
./script/manifest/update_manifest_local_dev.sh
if [[ $retVal -ne 0 ]]; then
echo "Error manifest update, check git-repo."
exit 1

View file

@ -2,15 +2,15 @@
. ./env_var.sh
./script/install_locally.sh
./script/install/install_locally.sh
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error ./script/install_locally.sh"
echo "Error ./script/install/install_locally.sh"
exit 1
fi
# Update git-repo
./script/update_manifest_prod.sh
./script/manifest/update_manifest_prod.sh
if [[ $retVal -ne 0 ]]; then
echo "Error manifest update, check git-repo."
exit 1

View file

@ -35,7 +35,7 @@ sudo chown -R ${EL_USER}:${EL_USER} ${EL_HOME_ERPLIBRE}/env_var.sh
LAST_PWD=$PWD
cd ${EL_HOME_ERPLIBRE}
sudo su ${EL_USER} -c "./script/install_locally_prod.sh"
sudo su ${EL_USER} -c "./script/install/install_locally_prod.sh"
cd ${LAST_PWD}
#echo -e "\n* Updating server config file"
#sudo su ${EL_USER} -c "printf 'logfile = /var/log/${EL_USER}/${EL_CONFIG}.log\n' >> /${EL_USER}/erplibre/config.conf"
@ -43,9 +43,9 @@ cd ${LAST_PWD}
#--------------------------------------------------
# Adding ERPLIBRE as a daemon
#--------------------------------------------------
./script/install_daemon.sh
./script/install/install_daemon.sh
#--------------------------------------------------
# Install Nginx if needed
#--------------------------------------------------
./script/install_production_nginx.sh
./script/install/install_production_nginx.sh

View file

@ -8,9 +8,6 @@ import zipfile
from colorama import Fore, Style
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(new_path)
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
_logger = logging.getLogger(__name__)

View file

@ -4,7 +4,7 @@
# poetry export -f ./.venv/build_dependency.txt --dev | poetry run -- pip install -r /dev/stdin
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Error ./script/poetry_add_build_dependency.sh"
echo "Error ./script/poetry/poetry_add_build_dependency.sh"
cat ./.venv/build_dependency.txt
exit 1
fi

View file

@ -10,11 +10,6 @@ from pathlib import Path
import iscompatible
import toml
new_path = os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(new_path)
from script import git_tool
_logger = logging.getLogger(__name__)
@ -24,8 +19,6 @@ def get_config():
:return: dict of config file settings and command line arguments
"""
config = git_tool.GitTool.get_project_config()
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description="""\
@ -368,7 +361,7 @@ def call_poetry_add_build_dependency():
:return: True if success
"""
status = os.system("./script/poetry_add_build_dependency.sh")
status = os.system("./script/poetry/poetry_add_build_dependency.sh")
return status == 0

View file

@ -13,7 +13,7 @@ The example works with application Helpdesk, install module `helpdesk_mgmt`.
You need to run with specified database, and you can run the example script.
```bash
./script/db_restore.py --database test
./script/database/db_restore.py --database test
./script/addons/install_addons.sh test restful,helpdesk_mgmt
./run.sh -d test
```

View file

@ -571,7 +571,7 @@ async def test_exec(
if not test_status:
# Create database
res, status = await run_command(
"./script/db_restore.py",
"./script/database/db_restore.py",
"--database",
unique_database_name,
"--image",

View file

@ -1,16 +0,0 @@
#!/usr/bin/env bash
. ./env_var.sh
#EL_MANIFEST_PROD="./default.xml"
#EL_MANIFEST_DEV="./manifest/default.dev.xml"
#EL_MANIFEST_EXP="./manifest/default.experimental.xml"
# Update git-repo
git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose &
DAEMON_PID=$!
./.venv/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${EL_MANIFEST_EXP}
./.venv/repo sync -v --force-sync -m ${EL_MANIFEST_EXP}
kill ${DAEMON_PID}

View file

@ -9,8 +9,8 @@ do
sed -i -e "s/$line/$1/g" ./.python-version
sed -i -e "s/$line/$1/g" ./docker/Dockerfile.base
sed -i -e "s/$line/$1/g" ./docker/python-versions.txt
sed -i -e "s/$line/$1/g" ./script/install_locally.sh
sed -i -e "s/$line/$1/g" ./script/install_OSX_dependency.sh
sed -i -e "s/$line/$1/g" ./script/install/install_locally.sh
sed -i -e "s/$line/$1/g" ./script/install/install_OSX_dependency.sh
sed -i -e "s/$line/$1/g" ./pyproject.toml
done < "$input"