about summary refs log tree commit diff
path: root/pkgs/development/python-modules/whool/setup-hook.sh
blob: 1c8ecdf2c66302b4345e0c97a35b00cfca2f6218 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Avoid using git to auto-bump the addon version
# DOCS https://github.com/sbidoul/whool/?tab=readme-ov-file#configuration
whool-post-version-strategy-hook() {
    # DOCS https://stackoverflow.com/a/13864829/1468388
    if [ -z ${WHOOL_POST_VERSION_STRATEGY_OVERRIDE+x} ]; then
        echo Setting WHOOL_POST_VERSION_STRATEGY_OVERRIDE to none
        export WHOOL_POST_VERSION_STRATEGY_OVERRIDE=none
    fi

    # Make sure you can import the built addon
    for manifest in $(find -L . -name __manifest__.py); do
        export pythonImportsCheck="$pythonImportsCheck odoo.addons.$(basename $(dirname $(realpath $manifest)))"
    done
}

preBuildHooks+=(whool-post-version-strategy-hook)