aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-01-17 15:17:09 +0900
committerMartin Schanzenbach <schanzen@gnunet.org>2023-01-17 15:17:09 +0900
commit30d8e25233f4cd9a1f3d43531f474af1040f3120 (patch)
treea90bff3efb3c872f42441daa11ee82790eff2f3f /contrib
parentc225268743b7571b1b6a326e34e002b3a4f40d2f (diff)
downloadgnunet-30d8e25233f4cd9a1f3d43531f474af1040f3120.tar.gz
gnunet-30d8e25233f4cd9a1f3d43531f474af1040f3120.zip
build: update git hooks again and fix autmatic installation on bootstrap
Diffstat (limited to 'contrib')
-rwxr-xr-x[-rw-r--r--]contrib/conf/commit-msg2
-rwxr-xr-x[-rw-r--r--]contrib/conf/prepare-commit-msg12
2 files changed, 8 insertions, 6 deletions
diff --git a/contrib/conf/commit-msg b/contrib/conf/commit-msg
index daa526270..7e6ec65ee 100644..100755
--- a/contrib/conf/commit-msg
+++ b/contrib/conf/commit-msg
@@ -16,7 +16,7 @@ do
16 then 16 then
17 RET=1 17 RET=1
18 # Check if it has a ChangeLog line 18 # Check if it has a ChangeLog line
19 if cat $COMMIT_MSG_FILE | grep \^ChangeLog: > /dev/null 19 if cat $COMMIT_MSG_FILE | grep "^ChangeLog:\s*[-,a-zA-Z][a-zA-Z]*" > /dev/null
20 then 20 then
21 RET=0 21 RET=0
22 break 22 break
diff --git a/contrib/conf/prepare-commit-msg b/contrib/conf/prepare-commit-msg
index 60aaa2894..16b4279ad 100644..100755
--- a/contrib/conf/prepare-commit-msg
+++ b/contrib/conf/prepare-commit-msg
@@ -24,14 +24,16 @@ done
24# ($COMMIT_SOURCE is empty). Otherwise, keep the default message 24# ($COMMIT_SOURCE is empty). Otherwise, keep the default message
25# proposed by Git. Possible commit source: message, template, 25# proposed by Git. Possible commit source: message, template,
26# merge, squash or commit. 26# merge, squash or commit.
27if [ $RET = 1 ]; 27if [ -z "$COMMIT_SOURCE" ];
28then 28then
29 if [ -z "$COMMIT_SOURCE" ] || [ "message" == "$COMMIT_SOURCE" ]; 29 hint=$(cat "$COMMIT_MSG_FILE")
30 echo ": Fixes #" > "$COMMIT_MSG_FILE"
31 echo -e "# Our commit subject format policy is:\n# <subsystem>: <description>\n# Adding 'Issue #1234'/'Fixes #1234' into the description will automatically update/resolve issue #1234 in mantis." >> "$COMMIT_MSG_FILE"
32 if [ $RET = 1 ];
30 then 33 then
31 hint=$(cat "$COMMIT_MSG_FILE") 34 echo -e "\n# Your commit includes staged changes that indicate an API change which requires a ChangeLog line." >> "$COMMIT_MSG_FILE"
32 echo -e "\n# Your commit includes staged changes that indicate an API change which requires a ChangeLog line. This info line will be ignored." > "$COMMIT_MSG_FILE"
33 echo "ChangeLog: " >> "$COMMIT_MSG_FILE" 35 echo "ChangeLog: " >> "$COMMIT_MSG_FILE"
34 echo "$hint" >> "$COMMIT_MSG_FILE"
35 fi 36 fi
37 echo "$hint" >> "$COMMIT_MSG_FILE"
36fi 38fi
37exit 0 39exit 0