Merge pull request #4005 from deitch/kernel-makefile-regex

ensure kernel replacement matches middle of line too
This commit is contained in:
Avi Deitcher 2024-03-04 06:24:06 -08:00 committed by GitHub
commit 413f3f3e67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -201,7 +201,7 @@ update-kernel-hash-yaml-%:
# find and replace any usage of the normal kernel with semver for most recent series
update-kernel-semver-yaml-%:
$(eval NEWTAG=linuxkit/kernel:$*)
$(eval OLDTAG=linuxkit/kernel:[0-9]+.[0-9]+.[0-9]+$$$$)
$(eval OLDTAG=linuxkit/kernel:[0-9]+.[0-9]+.[0-9]+)
@cd $(REPO_ROOT) && ./scripts/update-component-sha.sh --hash "$(OLDTAG)" "$(NEWTAG)"
# update-kernel-yamls updates the latest hash for each supported series,

View File

@ -69,8 +69,7 @@ case "${mode}" in
fi
old=$1
new=$2
git grep -E -l "\b$old\b" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,$old,$new,g" "$file"; done
git grep -E -l "\b($old)([[:space:]].*)?$" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,$old,$new,g" "$file"; done
;;
--image)
if [ $# -lt 1 ] ; then