This will be useful once we have autobuild for a v4-0-test
branch and want to cherry-pick commits from master
metze
Autobuild-User(master-autobuild): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master-autobuild): Mi 6. Jun 13:42:53 CEST 2012 on SERNOX11
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 7 01:18:55 CEST 2012 on sn-devel-104
#!/bin/sh
# add a autobuild message to the HEAD commit
-if grep -q '^Autobuild.User' "$1"; then
- echo "Already marked as tested"
+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
fi
cat <<EOF >> "$1"
-Autobuild-User: $fullname <$mailaddr>
-Autobuild-Date: $(date) on $(hostname)
+Autobuild-User($branch): $fullname <$mailaddr>
+Autobuild-Date($branch): $(date) on $(hostname)
EOF
exit 0