2024-05-16 04:29:28 +00:00
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
LAST_REF="$1"
|
|
|
|
CURRENT_REF="${2:-HEAD}"
|
2024-08-11 21:31:10 +00:00
|
|
|
IGNORE="${3:-ABCDEFG}"
|
2024-05-16 04:29:28 +00:00
|
|
|
|
|
|
|
cargo metadata --format-version=1 | \
|
|
|
|
jq -r '.packages[] | select(.source == null) | .name + " " + .manifest_path' | \
|
|
|
|
while read crate manifest_path; do
|
|
|
|
crate_path="$(dirname $manifest_path)"
|
2024-08-11 21:31:10 +00:00
|
|
|
git_log="$(git log --format='%h %s' "$LAST_REF".."$CURRENT_REF" "$crate_path" | { grep -v "$IGNORE" || true; })"
|
2024-05-16 04:29:28 +00:00
|
|
|
if test ! -z "$git_log"; then
|
|
|
|
echo "### Changes in $crate:"
|
|
|
|
echo ""
|
|
|
|
echo "\`\`\`"
|
|
|
|
echo "$git_log"
|
|
|
|
echo "\`\`\`"
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
done
|