Unverified Commit 4d1c332f authored by Kip's avatar Kip Committed by GitHub

Merge pull request #980 from Tachi107/hook-check-git-date

chore: check VERSION_GIT_DATE in pre-commit hook
parents cfd49927 2d08a39c
......@@ -5,5 +5,7 @@
# SPDX-License-Identifier: Apache-2.0
for file in $(git diff-index --cached --name-only HEAD | grep -E '\.(cpp|cc|hpp|h)$') ; do
clang-format --dry-run --Werror "$file" >/dev/null 2>&1 || (echo 'Run ninja clang-format before committing' && false)
clang-format --dry-run --Werror "$file" >/dev/null 2>&1 || (echo 'Run ninja clang-format before committing' 1>&2 && false)
done
grep "VERSION_GIT_DATE $(date +%Y%m%d)" version.txt || (echo 'Update VERSION_GIT_DATE in version.txt before committing' 1>&2 && false)
VERSION_MAJOR 0
VERSION_MINOR 0
VERSION_PATCH 002
VERSION_GIT_DATE 20210409
VERSION_GIT_DATE 20210915
SONAME_VERSION_MAJOR 0
SONAME_VERSION_MINOR 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment