summaryrefslogtreecommitdiffstats
path: root/script/commit_mark.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
commit8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch)
tree4099e8021376c7d8c05bdf8503093d80e9c7bad0 /script/commit_mark.sh
parentInitial commit. (diff)
downloadsamba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz
samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'script/commit_mark.sh')
-rwxr-xr-xscript/commit_mark.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/script/commit_mark.sh b/script/commit_mark.sh
new file mode 100755
index 0000000..3de6ba7
--- /dev/null
+++ b/script/commit_mark.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# add a autobuild message to the HEAD commit
+
+branch=$(git branch --contains HEAD | grep '^\* ' | sed -e 's/^\* //')
+
+if grep -q "^Autobuild\-User($branch): " "$1"; then
+ echo "Already marked as tested for $branch"
+ exit 0
+fi
+
+fullname=$(getent passwd $USER | cut -d: -f5 | cut -d',' -f1)
+mailaddr=$(git config user.email)
+if test -z "$mailaddr"; then
+ mailaddr="$USER@samba.org"
+fi
+cat <<EOF >>"$1"
+
+Autobuild-User($branch): $fullname <$mailaddr>
+Autobuild-Date($branch): $(date) on $(hostname)
+EOF
+exit 0