jonkeane commented on a change in pull request #10774:
URL: https://github.com/apache/arrow/pull/10774#discussion_r675687111
##########
File path: dev/release/post-03-website.sh
##########
@@ -55,14 +57,37 @@ rough_n_development_months=$((
git_tag=apache-arrow-${version}
git_range=apache-arrow-${previous_version}..${git_tag}
-committers_command_line="git shortlog -csn ${git_range}"
-contributors_command_line="git shortlog -sn ${git_range}"
-
-committers=$(${committers_command_line})
-contributors=$(${contributors_command_line})
+directories=("${ARROW_DIR}" "${ARROW_RS_DIR}")
Review comment:
Should this have the ARROW_DF_DIR in it as well?
##########
File path: dev/release/post-03-website.sh
##########
@@ -55,14 +57,37 @@ rough_n_development_months=$((
git_tag=apache-arrow-${version}
git_range=apache-arrow-${previous_version}..${git_tag}
-committers_command_line="git shortlog -csn ${git_range}"
-contributors_command_line="git shortlog -sn ${git_range}"
-
-committers=$(${committers_command_line})
-contributors=$(${contributors_command_line})
+directories=("${ARROW_DIR}" "${ARROW_RS_DIR}")
+git_ranges=(apache-arrow-${previous_version}..${git_tag}
${previous_version}..${version})
+
+committers=$(
+ for (( i=0; i<${#directories[@]}; i++ ));
+ do
+ cd ${directories[$i]}
+ git shortlog -csn ${git_ranges[$i]}
+ done |
+ awk '{
+ name_email="";
+ for (i=2; i<=NF; i++) { name_email=name_email " " $i};
+ count_by_user[name_email]+=$1} END {for (name_email in count_by_user)
print count_by_user[name_email], name_email}' |
+ sort -rn
+)
+
+contributors=$(
+ for (( i=0; i<${#directories[@]}; i++ ));
+ do
+ cd ${directories[$i]}
+ git shortlog -sn ${git_ranges[$i]}
+ done |
+ awk '{
+ name_email="";
+ for (i=2; i<=NF; i++) { name_email=name_email " " $i};
+ count_by_user[name_email]+=$1} END {for (name_email in count_by_user)
print count_by_user[name_email], name_email}' |
Review comment:
Would it make sense to pull this `awk` command out into a variable so we
only have to specify it once?
##########
File path: dev/release/post-03-website.sh
##########
@@ -115,7 +140,6 @@ This is a major release covering more than
${rough_n_development_months} months
This release includes ${n_commits} commits from ${n_contributors} distinct
contributors.
\`\`\`console
-$ ${contributors_command_line}
Review comment:
Do you know why `${contributors_command_line}` was called here but then
`${contributors}` was used below? I tried to work out a reasoning why but
couldn't quite grok what was going on here.
##########
File path: dev/release/post-03-website.sh
##########
@@ -55,14 +57,37 @@ rough_n_development_months=$((
git_tag=apache-arrow-${version}
git_range=apache-arrow-${previous_version}..${git_tag}
-committers_command_line="git shortlog -csn ${git_range}"
-contributors_command_line="git shortlog -sn ${git_range}"
-
-committers=$(${committers_command_line})
-contributors=$(${contributors_command_line})
+directories=("${ARROW_DIR}" "${ARROW_RS_DIR}")
+git_ranges=(apache-arrow-${previous_version}..${git_tag}
${previous_version}..${version})
+
+committers=$(
+ for (( i=0; i<${#directories[@]}; i++ ));
+ do
+ cd ${directories[$i]}
+ git shortlog -csn ${git_ranges[$i]}
+ done |
+ awk '{
+ name_email="";
+ for (i=2; i<=NF; i++) { name_email=name_email " " $i};
+ count_by_user[name_email]+=$1} END {for (name_email in count_by_user)
print count_by_user[name_email], name_email}' |
Review comment:
This is some `awk` right here!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]