From fef8e79a186df8f023a936f46a7ceaf445dd04ec Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Sat, 10 Aug 2024 23:45:44 -0400 Subject: [PATCH 1/8] Script to generate authors files by version for Bibtex Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100755 scripts/authors-by-version.sh diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh new file mode 100755 index 0000000..9e226cc --- /dev/null +++ b/scripts/authors-by-version.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +# Authors, comitters, co-authors +get_authors() { + local git_tag="$1" + shift # Shift arguments to get the files + local files="$@" + git --no-pager log "$git_tag" -- $files | \ + sed -n -e 's/^Author: //p' -e 's/^Committer: //p' -e 's/^.*Co-authored-by: //p' | \ + sort | uniq | sed -e 's/^/- /' +} + +# Ensure tag argument is provided +if [ "$#" -lt 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +GIT_TAG="$1" + +if [ ! $(git tag -l "$GIT_TAG") ] && [ ! "$GIT_TAG" == "HEAD" ]; then + echo " '$GIT_TAG' does not exist" + exit 1 +fi + +# Check if translations +git show "$GIT_TAG":i18n > /dev/null 2>&1 && i18n=true || i18n=false + + +# Output +cat < Date: Sun, 11 Aug 2024 00:01:51 -0400 Subject: [PATCH 2/8] Add example usage Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh index 9e226cc..22964a5 100755 --- a/scripts/authors-by-version.sh +++ b/scripts/authors-by-version.sh @@ -1,5 +1,11 @@ #!/bin/bash +# Example usage: +# mkdir -p reference +# for VERSION in v1.0.0 HEAD; do +# ./scripts/authors-by-version.sh $VERSION > reference/authors-$VERSION.md +# done + # Authors, comitters, co-authors get_authors() { local git_tag="$1" From 94e3b0007dfdeff75c697b719e2c85e1f54d3310 Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Sun, 11 Aug 2024 00:07:07 -0400 Subject: [PATCH 3/8] Generated v1.0.0 authors reference file Signed-off-by: Scott Rigby --- reference/authors-v1.0.0.md | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 reference/authors-v1.0.0.md diff --git a/reference/authors-v1.0.0.md b/reference/authors-v1.0.0.md new file mode 100644 index 0000000..df2ced6 --- /dev/null +++ b/reference/authors-v1.0.0.md @@ -0,0 +1,48 @@ +# v1.0.0 Authors + +This file is generated from Git history of the other canonical files in this repo, +and is purely a convenience for referencing in academic papers. +See the full Git history of those files for additional context. + +## Authors List + +- Andrew Block +- Brian Fox +- Brian Fox +- Brice Fernandes +- Cansu Kavılı Örnek +- Carlos Santana +- Carlos Santana +- Chris Sanders +- Chris Short +- Christian Hernandez +- Cornelia Davis +- Dan Garfield +- Daniel Warner +- Florian Heubeck +- Ishita Sequeira +- Jesse Butler +- John Pitman +- Kevin Bowersox +- Kingdon Barrett +- Leonardo Murillo +- Leonardo Murillo +- Lloyd Chang +- Lothar Schulz +- Michael Bridgen +- Moshe Immerman +- Nicholas Thomson +- Nicholas Thomson +- Piotr +- Regina Scott +- Robert A Ficcaglia +- Roberth Strand +- Schlomo Schapiro +- Scott Rigby +- Sean Sundberg +- Shoubhik Bose +- Timothy Lin +- Toni Menzel +- William Caban +- William Chia +- lloydchang From a019ed5c14d06f9f25d4b060b0d2f9e4aed4a4a7 Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Mon, 12 Aug 2024 18:21:42 -0400 Subject: [PATCH 4/8] Update note at the top of the top of generated files Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh index 22964a5..9203ffb 100755 --- a/scripts/authors-by-version.sh +++ b/scripts/authors-by-version.sh @@ -37,9 +37,11 @@ git show "$GIT_TAG":i18n > /dev/null 2>&1 && i18n=true || i18n=false cat < Date: Mon, 12 Aug 2024 18:25:45 -0400 Subject: [PATCH 5/8] Regenerate authors-v1.0.0.md Signed-off-by: Scott Rigby --- reference/authors-v1.0.0.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/reference/authors-v1.0.0.md b/reference/authors-v1.0.0.md index df2ced6..cf546af 100644 --- a/reference/authors-v1.0.0.md +++ b/reference/authors-v1.0.0.md @@ -1,8 +1,10 @@ # v1.0.0 Authors -This file is generated from Git history of the other canonical files in this repo, -and is purely a convenience for referencing in academic papers. -See the full Git history of those files for additional context. +⚠️ Do not edit this file directly. +It is [auto-generated](../scripts/authors-by-version.sh) from Git history of source files in this repo. + +ℹ️ Note this is purely a convenience for referencing in academic papers. +See the full Git history of specific files for additional context. ## Authors List From 94eee026bab5560fc65e932fafe3cb204d3b931b Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Tue, 13 Aug 2024 17:25:29 -0400 Subject: [PATCH 6/8] Use sort -u and check arg only once Co-authored-by: Christian Hernandez Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh index 9203ffb..852df65 100755 --- a/scripts/authors-by-version.sh +++ b/scripts/authors-by-version.sh @@ -13,17 +13,17 @@ get_authors() { local files="$@" git --no-pager log "$git_tag" -- $files | \ sed -n -e 's/^Author: //p' -e 's/^Committer: //p' -e 's/^.*Co-authored-by: //p' | \ - sort | uniq | sed -e 's/^/- /' + sort -u | sed -e 's/^/- /' } # Ensure tag argument is provided -if [ "$#" -lt 1 ]; then +GIT_TAG=$1 + +if [[ -z ${GIT_TAG} ]]; then echo "Usage: $0 " exit 1 fi -GIT_TAG="$1" - if [ ! $(git tag -l "$GIT_TAG") ] && [ ! "$GIT_TAG" == "HEAD" ]; then echo " '$GIT_TAG' does not exist" exit 1 From 23f19a9cebfa6efd6d6498bcee29479c670fc170 Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Tue, 13 Aug 2024 17:42:44 -0400 Subject: [PATCH 7/8] make shellcheck happy Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh index 852df65..214bc3d 100755 --- a/scripts/authors-by-version.sh +++ b/scripts/authors-by-version.sh @@ -10,7 +10,8 @@ get_authors() { local git_tag="$1" shift # Shift arguments to get the files - local files="$@" + local files="$*" + # shellcheck disable=SC2086 git --no-pager log "$git_tag" -- $files | \ sed -n -e 's/^Author: //p' -e 's/^Committer: //p' -e 's/^.*Co-authored-by: //p' | \ sort -u | sed -e 's/^/- /' @@ -24,7 +25,7 @@ if [[ -z ${GIT_TAG} ]]; then exit 1 fi -if [ ! $(git tag -l "$GIT_TAG") ] && [ ! "$GIT_TAG" == "HEAD" ]; then +if [ ! "$(git tag -l "$GIT_TAG")" ] && [ ! "$GIT_TAG" == "HEAD" ]; then echo " '$GIT_TAG' does not exist" exit 1 fi From 861182176385d14f2fbabf8f86d977e81ec20bd5 Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Tue, 13 Aug 2024 17:44:29 -0400 Subject: [PATCH 8/8] conditional bracket consistency Signed-off-by: Scott Rigby --- scripts/authors-by-version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/authors-by-version.sh b/scripts/authors-by-version.sh index 214bc3d..3ed5476 100755 --- a/scripts/authors-by-version.sh +++ b/scripts/authors-by-version.sh @@ -47,7 +47,7 @@ See the full Git history of specific files for additional context. EOF # If translations exist, output a note about language and translations -if [ $i18n = true ]; then +if [[ $i18n = true ]]; then cat <