Skip to content

Commit d13f0f5

Browse files
committed
usage of pre-commit
1 parent 1576f8c commit d13f0f5

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

misc/force-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.12-dev:::2024-05-17_16:44:44
1+
3.7.12-dev:::2024-05-17_17:57:26

pre-commit

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
#!/bin/bash
22
#
3-
# An example hook script to verify what is about to be committed.
4-
# Called by "git commit" with no arguments. The hook should
5-
# exit with non-zero status after issuing an appropriate message if
6-
# it wants to stop the commit.
3+
# a hook that is executed before each commmit (locally)
74
#
8-
# To enable this hook, rename this file to "pre-commit".
5+
# it ensures that a software version with time stamp
6+
# uniquely identifies each commmit
7+
#
8+
# note: will this cause merge conflicts when
9+
# collaborators change the version number or
10+
# version number is changed on GitHub?
11+
#
12+
# this script can be installed with:
13+
# ./pre-commit install
14+
915

1016
if [ $# -eq 1 ] && [ "$1" == "install" ]; then
1117
cp "$0" -t .git/hooks/
@@ -24,3 +30,5 @@ TIME=$(date +"%Y-%m-%d_%H:%M:%S")
2430
printf "%s:::%s\n" "$VERSION" "$TIME" > "$FILE"
2531

2632
git add "$FILE"
33+
34+
exit 0

0 commit comments

Comments
 (0)