Skip to content

Commit

Permalink
restrict update to just yaml files
Browse files Browse the repository at this point in the history
Signed-off-by: Avi Deitcher <[email protected]>
  • Loading branch information
deitch committed Nov 5, 2021
1 parent c07b11a commit 920a83d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update-component-sha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ updateImage() {
hash=$2
;;
esac
git grep -E -l "[[:space:]]$image:" | grep -v /vendor/ | xargs sed -i.bak -E -e "s,([[:space:]])($image):([^[:space:]]+), $image:$hash,g"
git grep -E -l "[[:space:]]$image:" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | xargs sed -i.bak -E -e "s,([[:space:]])($image):([^[:space:]]+), $image:$hash,g"
}

# backwards compatibility
Expand All @@ -70,7 +70,7 @@ case "${mode}" in
old=$1
new=$2

git grep -w -l "\b$old\b" | grep -v /vendor/ | xargs sed -i.bak -e "s,$old,$new,g"
git grep -w -l "\b$old\b" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | xargs sed -i.bak -e "s,$old,$new,g"
;;
--image)
if [ $# -lt 1 ] ; then
Expand Down

0 comments on commit 920a83d

Please sign in to comment.