Add files to commit/stage if modified

This commit is contained in:
Lucas Peter 2025-03-12 14:20:47 +01:00
parent 4d62592839
commit a48fe12661
No known key found for this signature in database

View file

@ -120,6 +120,11 @@ for file in "${files[@]}"; do
((errors++))
${DRY_RUN} && echo "❌ Problème détecté : ${file}"
fi
if [[ "${DRY_RUN}" == false ]] && ! git diff --quiet "${file}"; then
git add "${file}"
${VERBOSE} && echo "📥 Ajout de ${file} au staging"
fi
done
if [[ ${errors} -gt 0 ]]; then