diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000000..2c81b9938ea --- /dev/null +++ b/.mailmap @@ -0,0 +1,12 @@ +# man 5 gitmailmap +# git log --mailmap --pretty=short | grep ^Author: | sort -u +Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> jaekwon +Jae Kwon <53785+jaekwon@users.noreply.github.com> Naut Jae +Thomas Bruyelle Thomas Bruyelle +Thomas Bruyelle Thomas Bruyelle +Miloš Živković Miloš Živković +Hariom Verma Hariom Verma +Giancarlos Salas Giancarlos Salas +Morgan Morgan diff --git a/misc/list-gnophers/main.sh b/misc/list-gnophers/main.sh new file mode 100755 index 00000000000..beb90d4c767 --- /dev/null +++ b/misc/list-gnophers/main.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +main() { + cd ../.. + for file in $(list_gno_files); do + extract_file_metadata $file + done > gno_file_commits.csv + echo + cat gno_file_commits.csv | sort_by_date | unique_by_author +} + +list_gno_files() { + # list .gno file in examples/, remove tests and unit tests + find ./examples -name "*.gno" | grep -v _filetest.gno | grep -v _test.gno | grep -v gno.land/r/demo/tests +} + +extract_file_metadata() { + file=$1 + # get the first commit date of the file + first_commit_date=$(git log --pretty=format:%ct --follow $file | tail -n 1) + # get the email of the first contributor of the file + email=$(git log --mailmap --pretty=format:%aE --follow $file | tail -n 1) + # print the file name, first commit date, and email + echo "$first_commit_date,$email,$file" +} + +sort_by_date() { + sort -t, -k1 +} + +unique_by_author() { + awk -F, '!seek[$2]++' +} + +main