File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1
- 3.7.12-dev
1
+ 3.7.12-dev:::2024-05-17_16:44:44
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ #
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.
7
+ #
8
+ # To enable this hook, rename this file to "pre-commit".
9
+
10
+ if [ $# -eq 1 ] && [ " $1 " == " install" ]; then
11
+ cp " $0 " -t .git/hooks/
12
+ exit 0
13
+ fi
14
+
15
+ FILE=" misc/force-version.txt"
16
+
17
+ if ! grep ' dev' " $FILE " & > /dev/null; then
18
+ exit 0
19
+ fi
20
+
21
+ VERSION=$( sed -E ' s/:::.*//' " $FILE " )
22
+ TIME=$( date +" %Y-%m-%d_%H:%M:%S" )
23
+
24
+ printf " %s:::%s\n" " $VERSION " " $TIME " > " $FILE "
25
+
26
+ git add " $FILE "
You can’t perform that action at this time.
0 commit comments