/
deka
/
buffer
Обзор
Документация
Войти
/
deka
/
buffer
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
tools/hooks/pre-commit
27 строк
813 B
Maksim Ratnikov
build: auto-bump patch version on every commit via pre-commit hook
24 июл 2026, 10:41
24 июл 2026, 10:41
70daf7f
Код
Авторство
О чём код?
#!/bin/sh # Auto-bump the patch version on every commit: raise the patch + date in the # lab template, rebuild the assembled lab, and stage both so the version ships # with the commit (and, via CI, into master). major.minor stay manual. # # Skip for one commit with: NO_VERSION_BUMP=1 git commit ... # Installed via: git config core.hooksPath tools/hooks set -e if [ "${NO_VERSION_BUMP:-}" = "1" ]; then exit 0 fi # Without node we can't rebuild — skip rather than block the commit. if ! command -v node >/dev/null 2>&1; then echo "pre-commit: node not found — skipping version bump" >&2 exit 0 fi ROOT=$(git rev-parse --show-toplevel) cd "$ROOT" node tools/bump-version.mjs node tools/build-lab.mjs >/dev/null git add lab/wiki-clipboard-lab.template.html lab/wiki-clipboard-lab.html