diff --git a/dev/tools/github_commits_perversion.sh b/dev/tools/github_commits_perversion.sh index 2f3020ff721..e8232397e60 100755 --- a/dev/tools/github_commits_perversion.sh +++ b/dev/tools/github_commits_perversion.sh @@ -3,8 +3,8 @@ # Count number of commits per user and per versions (using date for version detection) # -Releases=("16.0" "develop") -Dates=("2022-01-01" "2022-08-31" "2050-01-01") +Releases=("17.0" "18.0" "develop") +Dates=("2023-02-01" "2023-08-31" "2050-01-01") let "counter = 1" for i in "${Releases[@]}" diff --git a/dev/tools/github_lines_perusers.sh b/dev/tools/github_lines_perusers.sh index 9a3fad09d62..e67ee61f00c 100755 --- a/dev/tools/github_lines_perusers.sh +++ b/dev/tools/github_lines_perusers.sh @@ -4,13 +4,17 @@ # if [ "x$2" = "x" ]; then - echo "Usage: $0 tagnamestart|START tagnameend|HEAD" + echo "Usage: $0 origin/branchstart|tagnamestart|START origin/branchend|tagnameend|HEAD" exit fi +START=$1 +if [ "x$START" = "xSTART" ]; then + START="" +fi -echo "git log $1..$2 --shortstat | grep ... | perl ... > /tmp/github_lines_perusers.tmp" -git log $1..$2 --shortstat | grep -e 'Author:' -e 'Date:' -e ' changed' -e ' insertion' -e ' deletion' | perl -n -e '/^(.*)$/; $line = $1; if ($line =~ /(changed|insertion|deletion)/) { $line =~ s/[^0-9\s]//g; my @arr=split /\s+/, $line; $tot=0; for (1..@arr) { $tot += $arr[$_]; }; print $tot."\n"; } else { print $line."\n"; };' > /tmp/github_lines_perusers.tmp +echo "git log $START..$2 --shortstat | grep ... | perl ... > /tmp/github_lines_perusers.tmp" +git log $START..$2 --shortstat | grep -e 'Author:' -e 'Date:' -e ' changed' -e ' insertion' -e ' deletion' | perl -n -e '/^(.*)$/; $line = $1; if ($line =~ /(changed|insertion|deletion)/) { $line =~ s/[^0-9\s]//g; my @arr=split /\s+/, $line; $tot=0; for (1..@arr) { $tot += $arr[$_]; }; print $tot."\n"; } else { print $line."\n"; };' > /tmp/github_lines_perusers.tmp cat /tmp/github_lines_perusers.tmp | awk 'BEGIN { FS="\n"; print "user and nb of lines"; lastuser=""; } { if ($1 ~ /Author:/) { lastuser=$1 }; if ($1 ~ /^[0-9]+$/) { aaa[lastuser]+=$1; } } END { for (var in aaa) print var," ",aaa[var]; } '