3096 lines
99 KiB
Bash
Executable File
3096 lines
99 KiB
Bash
Executable File
#!/bin/bash
|
|
cd "$(dirname "$0")" || exit
|
|
# Commands such as git pull return exit code if there are no changes
|
|
# set -e
|
|
|
|
if [[ -a ".env" ]]; then
|
|
source .env
|
|
fi
|
|
|
|
help-table() {
|
|
local -a rows
|
|
local max_cmd=7 max_opt=6 max_desc=11
|
|
|
|
rows+=("Command|Option|Description")
|
|
rows+=("===ENV===| | ")
|
|
rows+=("backup-env-files|[path]|Archive and copy ,env files to target location.")
|
|
rows+=("copy-dotenv|[env][env]|Copy .env file.")
|
|
rows+=("create-dotenv|[env][type]|Create .env file of type nextcloud, odoo, upgrade.")
|
|
rows+=("edit-dotenv|[env]|Open .env file in default editor.")
|
|
rows+=("list-dotenv||List .env files.")
|
|
rows+=("load-dotenv|[env]|Load and export .env file.")
|
|
rows+=("remove-dotenv|[env]|Remove environment config.")
|
|
rows+=("rename-dotenv|[env][env]|Rename .env file.")
|
|
rows+=("restore-dotenv-files|[path]|Extract and copy .env files from backup file.")
|
|
rows+=("show-dotenv|[env]|Output content of the .env file.")
|
|
rows+=("===GIT===| | ")
|
|
rows+=("aggregate-git-folders|[path]|Run gitaggregate for the repos.yaml.")
|
|
rows+=("add-git-folder|[branch][url][path]|Add git folder to .gitmodules.")
|
|
rows+=("checkout|[version]|Checkout Odoo version.")
|
|
rows+=("checkout-git-folder|[branch][path]|Checkout git commit from .gitmodules.")
|
|
rows+=("commit-git-folder|[message][path]|Commit all changes in path.")
|
|
rows+=("clean-git-folder|[path]|Clean git folder.")
|
|
rows+=("clone-git-folder|[branch][path][version]|Clone git folder listed in the .gitmodules file.")
|
|
rows+=("download-git-folder|[grep]|Download git folder listed in the .gitmodules file.")
|
|
rows+=("status-git-folder|[path]|Show status for git folder in path.")
|
|
rows+=("list-git-folder|[path]|List path and url of git folders.")
|
|
rows+=("pull-git-folder|[branch][path]|Pull all git folders listed in the .gitmodules file.")
|
|
rows+=("push-git-folder||Push all git folders in path.")
|
|
rows+=("remove-git-folder|[path]|Remove git folders in path.")
|
|
rows+=("ls-git-folder|[grep]|List git folders path space separated.")
|
|
rows+=("reset-git-folder|[path]|Abort rebase and reset git folder.")
|
|
rows+=("stage-git-folder|[path]|Stage all files in git folders in path.")
|
|
rows+=("switch-git-folder|[branch][path]|Switch branch for all git folders from the .gitmodules file.")
|
|
rows+=("sync-git-folder|[branch][path]|Switch, stash and pull all git folders.")
|
|
rows+=("run-pre-commit|[path]|Run pre-commit in path.")
|
|
rows+=("===DOCKER===| | ")
|
|
rows+=("archive-docker-tags||Archive Docker image tags on hub older than 1 year.")
|
|
rows+=("build-odoo|[output]|Build Odoo Docker image.")
|
|
rows+=("build-odoo-mailgate|[output]|Build Odoo Mailgate Docker image.")
|
|
rows+=("build-odoo-upgrade|[output]|Build Odoo Upgrade Docker image.")
|
|
rows+=("build-odoo-cli|[output]|Build Odoo CLI Docker image.")
|
|
rows+=("login-docker|[user][token]|Setup Docker Hub login credentials.")
|
|
rows+=("login-podman|[user][token]|Login into registry with podman.")
|
|
rows+=("container-ps||List container processes.")
|
|
rows+=("remove|[name]|Remove containers and volumes.")
|
|
rows+=("test-image-script|[folder]|Test scripts of target Docker image folder.")
|
|
rows+=("test-odoo-version-regex||Test the Odoo module version regex filter.")
|
|
rows+=("===VUEPRESS===| | ")
|
|
rows+=("build-vuepress||Create Vuepress build.")
|
|
rows+=("install-vuepress||Install Node build dependencies.")
|
|
rows+=("dev-vuepress||Start Vuepress development server.")
|
|
rows+=("serve-vuepress||Serve Vuepress build.")
|
|
rows+=("===DATABASE===| | ")
|
|
rows+=("change-uuid|[env]|Change database uuid via xmlrpc.")
|
|
rows+=("clear-assets|[db]|Clear all assets of Odoo database.")
|
|
rows+=("clear-filestore|[db]|Clear local filestore folder.")
|
|
rows+=("clear-views|[db]|Clear all views of Odoo database.")
|
|
rows+=("cloc-odoo|[db]|Count custom line of codes.")
|
|
rows+=("drop-db|[db]|Drop target Odoo database.")
|
|
rows+=("init-db|[db]|Initialize the Odoo database.")
|
|
rows+=("load-language|[db][lang]|Install language package in Odoo db.")
|
|
rows+=("patch-database|[db][path]|Apply sql file to database.")
|
|
rows+=("reset-views|[db][key]|Execute hard reset on views matching keys.")
|
|
rows+=("set-admin|[db]|Sets the password for the first user in database.")
|
|
rows+=("update-module|[db][name,path]|Update target Odoo module.")
|
|
rows+=("update-module-list|[db]|Update module list of Odoo database.")
|
|
rows+=("===REVISION===| | ")
|
|
rows+=("checkout-latest-revision|[version]|Checkout the latest revision of the Odoo version.")
|
|
rows+=("checkout-revision|[revision]|Load Odoo revision env var and checkout git folders.")
|
|
rows+=("commit-and-push-revision|[revision]|Commit all changes and tag with current revision.")
|
|
rows+=("create-revision|[revision]|Create new Odoo revision.")
|
|
rows+=("list-revision||List available Odoo revisions.")
|
|
rows+=("load-latest-revision|[version]|Load the latest revision of the Odoo version.")
|
|
rows+=("load-revision|[revision]|Load env var from specified revision.")
|
|
rows+=("show-revision|[revision]|Show references of Odoo revision.")
|
|
rows+=("===LLM===| | ")
|
|
rows+=("commit-with-llm||Commit with llm generated commit message.")
|
|
rows+=("update-with-llm|[glob][prompt]|Feed module files with prompt to LLM and apply file changes.")
|
|
rows+=("===SNIPPETS===| | ")
|
|
rows+=("create-snippet|[xml-id]|Create snippet from template.")
|
|
rows+=("install-snippet|[env][path]|Install snippet definition.")
|
|
rows+=("disable-snippet|[env][path]|Disable snippet by path or xml-id.")
|
|
rows+=("enable-snippet|[env][path]|Enable snippet by path or xml-id.")
|
|
rows+=("lint-snippets||Run checks for all snippets.")
|
|
rows+=("remove-snippet|[env][path]|Remove snippet by path or xml-id.")
|
|
rows+=("update-snippet|[env][path]|Update snippet definition.")
|
|
rows+=("===INSTALL===| | ")
|
|
rows+=("activate-venv||Activate virtualenv.")
|
|
rows+=("init-venv||Initialize python virtual env.")
|
|
rows+=("disable-mailserver|[env]|Disable mail server settings via xmlrpc.")
|
|
rows+=("install||Install Odoo requirements in source folder.")
|
|
rows+=("install-ansible-build-scripts|[role]|Install scripts of the specified Ansbile role.")
|
|
rows+=("install-requirements|[db][path]|Install python packages from requirements.txt.")
|
|
rows+=("list-packages||List installed python packages.")
|
|
rows+=("init-module|[db][path,module]|Initialize Odoo module.")
|
|
rows+=("set-addons-path||Set Odoo addons path env variable.")
|
|