Skip to content

Commit

Permalink
utils: new script to add sender' SoB
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Change-Id: Ia5524c54dce751e1497866e41e5dc3a2ac034a9b
  • Loading branch information
matttbe committed Mar 23, 2020
1 parent 86db9e7 commit fc630ac
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions utils/tg-add-signed-off-sender.sh
@@ -0,0 +1,30 @@
#!/bin/bash -e

SOB="Signed-off-by"
SENDER="${SOB}: ${1:?"Usage: ${0} 'NAME <EMAIL>'"}"
END="${2:-}"

add_signed_off_if_needed() {
if grep -q "${SENDER}" .topmsg; then
echo "${SOB} already there"
else
echo "Adding ${SOB}"
echo "${SENDER}" >> .topmsg
git add .topmsg
git commit -sm "tg:msg: add sender' ${SOB}"
fi
}

next() {
[ "$(git rev-parse --abbrev-ref HEAD)" = "${END}" ] && return 1
tg checkout next
}

./.tg-first.sh
add_signed_off_if_needed
while next; do
tg update
./.title.sh
add_signed_off_if_needed
done
tg push

0 comments on commit fc630ac

Please sign in to comment.