25 lines
840 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Pre-commit hook для автоповышения версии
echo "🔄 Проверка версии backend..."
# Проверка, есть ли изменения в backend
if git diff --cached --name-only | grep -q '^backend/'; then
echo "📝 Обнаружены изменения в backend, обновление версии..."
# Запуск скрипта повышения версии
bash bump_version.sh
# Проверка, был ли изменен файл версии
if git diff --name-only | grep -q '^backend/VERSION'; then
echo "✅ Версия обновлена, добавляем в коммит"
git add backend/VERSION
fi
else
echo " Изменений в backend нет, версия не обновляется"
fi
exit 0