update-component-sha.sh: ignore changes in directories named "vendor"

src/cmd/linuxkit/vendor/github.com/moby/tool/src/moby/linuxkit.go embeds a yaml
fragement with some hashes in it, so avoid updating that since that would make
the vendoring unclean.

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2018-04-25 10:47:33 +01:00
parent 4320c3928f
commit 6c1ba442b4

View File

@ -56,7 +56,7 @@ case "$1" in
old=$2
new=$3
git grep -w -l "\b$old\b" | xargs sed -i.bak -e "s,$old,$new,g"
git grep -w -l "\b$old\b" | grep -v /vendor/ | xargs sed -i.bak -e "s,$old,$new,g"
;;
--image)
case $# in
@ -69,7 +69,7 @@ case "$1" in
hash=$3
;;
esac
git grep -E -l "\b$image:" | xargs sed -i.bak -E -e "s,$image:([[:xdigit:]]{40}|v[0-9\.]+),$image:$hash,g"
git grep -E -l "\b$image:" | grep -v /vendor/ | xargs sed -i.bak -E -e "s,$image:([[:xdigit:]]{40}|v[0-9\.]+),$image:$hash,g"
;;
*)
echo "Unknown mode $1"