Commit Graph
6 Commits
Author SHA1 Message Date
Simon Genin (ges) c81c1ac6b1 [FIX] web: tooling -> cp -r doesn't copy symlink on macOS
closes odoo/odoo#94124

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-06-21 11:20:26 +02:00
Pierre Rousseau aee53b0d48 [FIX] web: ensure realpath is installed
With this commit, if realpath is not available (for exemple on macos),
the script is directly stopped.

closes odoo/odoo#90522

X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-05-04 19:17:45 +02:00
Pierre Rousseau 9e65c6a00b [FIX] web: fix tooling for enterprise repo
Since fcf2e2210a639adfcdb9236c24cfb31046b6dead, the path of enterprise
is derived from the tooling path instead of the community path.

X-original-commit: 4ff8f62aa1e10d27189ebbdd22a01711c700ea32
Part-of: odoo/odoo#90522
2022-05-04 19:17:44 +02:00
Samuel Degueldre 92497ed4f1 [FIX] web: fix tooling failing to run due to bash-specific syntax
In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.

After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.

closes odoo/odoo#87436

X-original-commit: 3104ab16ecf88d4f7b1618db4d62e7f57df34e6c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-03-29 12:00:11 +02:00
Simon Genin (ges) 9583c74e5f [FIX] web: make js tooling safe with paths with spaces
If $basepath in the tooling contained spaces, it could have dramatic
consequences on the rm -rf command.
We simply escape everything to avoid the problem.

closes odoo/odoo#73222

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-05 13:07:48 +00:00
Simon Genin (ges) 8d57a5cde9 [ADD] web: prettier and eslint tooling
Provide an opt in js tooling system by adding a node env with prettier and eslint configured.
3 bash scripts are provided: enable.sh, disable.sh and reload.sh.

Enable.sh: add to the community root (and optionaly to the enterprise root) the env.
Disable.sh: remove the env.
Reload.sh: disable then enable.
2021-06-18 21:31:27 +02:00