Skip to content

Commit

Permalink
add find_affected_jars
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk committed Sep 15, 2021
1 parent e5fd07e commit 42b88e3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/scripts/find_affected_jars.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -e

[ "$1" == "" ] && echo "usage: $0 <commitish>" && exit 1
c="$1"

find packaging/ -name 'hive*jar' -exec unzip -t "{}" \; > _contents


git diff "$c"|grep '^+++'|
cut -c 5-|
sed 's/java$/class/'|
grep 'class$'|
sed -r 's|^(.*/)|/|' > pats


fgrep -f <(cat pats;echo Archive:) _contents |fgrep -B1 -f pats
echo -e "\n --- \n"

fgrep -f <(cat pats;echo Archive:) _contents |fgrep -B1 -f pats|grep Archive

0 comments on commit 42b88e3

Please sign in to comment.