diff --git a/devtools/credit b/devtools/credit new file mode 100755 index 000000000..c01a09671 --- /dev/null +++ b/devtools/credit @@ -0,0 +1,50 @@ +#! /bin/sh + +VERBOSE=false + +if [ x"$1" = x"--verbose" ]; then + VERBOSE=true + shift +fi + +if [ "$#" != 1 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi +PREV_TAG="$1" + +git log "$PREV_TAG".. --format="%an|%ae" | sort | uniq -c | sort -rn > /tmp/authors.$$ +sed -n 's/.*[Nn]amed by //p' < CHANGELOG.md > /tmp/namers.$$ +git log "$PREV_TAG" --format="%an|%ae" | sort -u > /tmp/prev-authors.$$ + +NAMER="" +BACKUP_NAMER="" +TOTAL=0 +while read LINE; do + COUNT=${LINE%% [^ 0123456789]*} + TOTAL=$(($TOTAL + $COUNT)) + LINE=${LINE#*[1234567890] } + NAME=${LINE%%|*} + EMAIL=${LINE#*|} + NOTES="" + if [ $(grep -ci -- "$NAME\|$EMAIL" /tmp/prev-authors.$$) = 0 ]; then + NOTES="$NOTES""NEW COMMITTER " + fi + if ! grep -q -- "$NAME" /tmp/namers.$$; then + if [ -z "$NAMER" ]; then + NAMER="$NAME" + NOTES="$NOTES""*NEXT NAMER* " + elif [ -z "$BACKUP_NAMER" ]; then + BACKUP_NAMER="$NAME" + NOTES="$NOTES""*BACKUP NAMER* " + fi + fi + if [ -n "$NOTES" ] || $VERBOSE; then + echo "$COUNT $NAME $EMAIL $NOTES" + fi +done < /tmp/authors.$$ + +DAYS=$(( ( $(date +%s) - $(git log "$PREV_TAG" --format=%at | head -n1) ) / (3600*24) )) + +echo "$TOTAL commits in $DAYS days" +rm /tmp/authors.$$ /tmp/namers.$$ /tmp/prev-authors.$$ diff --git a/doc/MAKING-RELEASES.md b/doc/MAKING-RELEASES.md index c1b687753..5616c04e5 100644 --- a/doc/MAKING-RELEASES.md +++ b/doc/MAKING-RELEASES.md @@ -9,7 +9,8 @@ Here's a checklist for the release process. 2. Create a milestone for the *next* release, and go though issues and PR and mark accordingly. 3. Ask the most significant contributor who has not already named a - release to name the release. CC previous namers and team. + release to name the release (use devtools/credit). CC previous namers + and team. ### Prepering for -rc1 @@ -25,7 +26,7 @@ Here's a checklist for the release process. 1. Merge the PR above. 2. Tag it `git pull && git tag -s vrc1 && git push --tags` 3. Update the /topic on #c-lightning on Freenode. -4. Prepare draft release notes, and share with team for editing. +4. Prepare draft release notes (see devtools/credit), and share with team for editing. 5. Upgrade your personal nodes to the rc1, to help testing. ### Tagging the Release