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.
This commit is contained in:
Cédric Krier
2023-08-12 13:52:54 +02:00
parent fbc05e3d22
commit e3444ecac8
27 changed files with 51 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/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