Add files to commit/stage if modified
This commit is contained in:
parent
4d62592839
commit
a48fe12661
1 changed files with 5 additions and 0 deletions
|
@ -120,6 +120,11 @@ for file in "${files[@]}"; do
|
||||||
((errors++))
|
((errors++))
|
||||||
${DRY_RUN} && echo "❌ Problème détecté : ${file}"
|
${DRY_RUN} && echo "❌ Problème détecté : ${file}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${DRY_RUN}" == false ]] && ! git diff --quiet "${file}"; then
|
||||||
|
git add "${file}"
|
||||||
|
${VERBOSE} && echo "📥 Ajout de ${file} au staging"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ${errors} -gt 0 ]]; then
|
if [[ ${errors} -gt 0 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue