Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
4d1c332f
Unverified
Commit
4d1c332f
authored
Sep 15, 2021
by
Kip
Committed by
GitHub
Sep 15, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #980 from Tachi107/hook-check-git-date
chore: check VERSION_GIT_DATE in pre-commit hook
parents
cfd49927
2d08a39c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
.hooks/pre-commit
.hooks/pre-commit
+3
-1
version.txt
version.txt
+1
-1
No files found.
.hooks/pre-commit
View file @
4d1c332f
...
@@ -5,5 +5,7 @@
...
@@ -5,5 +5,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: Apache-2.0
for
file
in
$(
git diff-index
--cached
--name-only
HEAD |
grep
-E
'\.(cpp|cc|hpp|h)$'
)
;
do
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
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.txt
View file @
4d1c332f
VERSION_MAJOR 0
VERSION_MAJOR 0
VERSION_MINOR 0
VERSION_MINOR 0
VERSION_PATCH 002
VERSION_PATCH 002
VERSION_GIT_DATE 20210
409
VERSION_GIT_DATE 20210
915
SONAME_VERSION_MAJOR 0
SONAME_VERSION_MAJOR 0
SONAME_VERSION_MINOR 0
SONAME_VERSION_MINOR 0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment