Previously, the tooling for web ran on all branches, this can cause problems because it will automatically lint all files that have been changed on commit, which can cause a lot of noise in the diff which is undesirable in stable branches, as it makes forward ports more difficult, among other things. This commit adds a condition in the tooling so that it only runs on branches whose name starts with master to fix this issue. closes odoo/odoo#86200 X-original-commit: 5962b63f4ad1cfeccc0a80de2307300b50492668 Signed-off-by: Géry Debongnie <ged@odoo.com> Signed-off-by: Samuel Degueldre <sad@odoo.com>
8 lines
215 B
Bash
Executable File
8 lines
215 B
Bash
Executable File
#!/bin/bash
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
|
|
# run tooling only on branches that start with master to avoid linting noise in stable
|
|
if [[ $(git branch --show-current) == master* ]]; then
|
|
npm run format-staged
|
|
fi
|