[improve] use eamil to uniq authors
@@ -45,7 +45,9 @@ pub fn add_env_vergen() {
pub fn add_env_commit_authors() {
let r = run_script::run_script!(
- r#"git shortlog HEAD --summary | perl -lnE 's/^\s+\d+\s+(.+)/ "$1",/; next unless $1; say $_' | sort | xargs"#
+ // use eamil to uniq authors
+ r#"git shortlog HEAD -sne | awk '{$1=""; sub(" ", " \""); print }' | awk -F'<' '!x[$1]++' | \
+ awk -F'<' '!x[$2]++' | awk -F'<' '{gsub(/ +$/, "\",", $1); print $1}' | sort | xargs"#
);
let authors = match r {
Ok((_, output, _)) => output,
