Files
tryton/.gitlab-scripts/check-template-modules.sh
T
Cédric Krier e3444ecac8 Check modules against template model
Some files in modules should always be the same as the template.
We add a CI task to check those files against a new templated version of the
module.
2023-08-12 13:52:54 +02:00

17 lines
427 B
Bash
Executable File

#!/bin/sh
set -eu
OUTPUT=`mktemp -d`
find modules -name setup.py -print | while read path
do
path=`dirname "${path}"`
module=`basename "${path}"`
printf "Check $module ... "
cookiecutter --no-input cookiecutter-module -o "${OUTPUT}" module_name="${module}"
for file in tox.ini .readthedocs.yaml doc/conf.py
do
cmp "${path}/${file}" "${OUTPUT}/${module}/${file}"
done
printf "OK\n"
done