Skip to content

Commit bce58b1

Browse files
author
Ian Campbell
committed
Portable make update-hashes.
MacOS lacks `xargs`' `--no-run-if-empty` option. Since the `git grep` always matches at least one file it's not really needed. However since the files which need patching are just those under yml/ which are small enough in number and size that we can just unconditionally apply the update to the all. Fixes #52. Signed-off-by: Ian Campbell <ijc@docker.com>
1 parent 87d035d commit bce58b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ update-hashes:
3232
$$(linuxkit pkg show-tag pkg/kubernetes-docker-image-cache-common) \
3333
$$(linuxkit pkg show-tag pkg/kubernetes-docker-image-cache-control-plane) ; do \
3434
image=$${tag%:*} ; \
35-
git grep -E -l "\b$$image:" | xargs --no-run-if-empty sed -i.bak -e "s,$$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$$tag,g" ; \
35+
sed -i.bak -e "s,$$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$$tag,g" yml/*.yml ; \
3636
done
3737

3838
.PHONY: clean

0 commit comments

Comments
 (0)