mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
properly handle sed for update-component-sha.sh
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
470a9287e6
commit
3d0cd9d5da
@ -69,8 +69,8 @@ SPACE := $(eval) $(eval)
|
|||||||
PERIOD := .
|
PERIOD := .
|
||||||
# series - convert a version to a series, e.g. 6.6.13 -> 6.6.x
|
# series - convert a version to a series, e.g. 6.6.13 -> 6.6.x
|
||||||
series = $(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1))).x
|
series = $(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1))).x
|
||||||
# serieswildcard - convert a version with or without a hash to a wildcard, e.g. 6.6.13-anbcd -> 6.6.-*
|
# serieswithhash - convert a version with or without a hash to a series with a hash, e.g. 6.6.13-anbcd -> 6.6.x-[0-9a-f]+
|
||||||
serieswildcard = $(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1))).[0-9]+-[0-9a-f]+.*
|
serieswithhash = $(word 1,$(subst ., ,$(1))).$(word 2,$(subst ., ,$(1))).[0-9]+-[0-9a-f]+
|
||||||
|
|
||||||
# word 1 is the release, word 2 is the tool
|
# word 1 is the release, word 2 is the tool
|
||||||
RELEASESEP := PART
|
RELEASESEP := PART
|
||||||
@ -195,7 +195,7 @@ tag-debugkernel-%:
|
|||||||
# will update hash for same semver and/or patch version
|
# will update hash for same semver and/or patch version
|
||||||
update-kernel-hash-yaml-%:
|
update-kernel-hash-yaml-%:
|
||||||
$(eval NEWTAG=$(shell $(MAKE) tag-plainkernel-$*))
|
$(eval NEWTAG=$(shell $(MAKE) tag-plainkernel-$*))
|
||||||
$(eval OLDTAG=$(call serieswildcard,$(NEWTAG)))
|
$(eval OLDTAG=$(call serieswithhash,$(NEWTAG)))
|
||||||
@cd $(REPO_ROOT) && ./scripts/update-component-sha.sh --hash "$(OLDTAG)" "$(NEWTAG)"
|
@cd $(REPO_ROOT) && ./scripts/update-component-sha.sh --hash "$(OLDTAG)" "$(NEWTAG)"
|
||||||
|
|
||||||
# find and replace any usage of the normal kernel with semver for most recent series
|
# find and replace any usage of the normal kernel with semver for most recent series
|
||||||
|
@ -69,7 +69,7 @@ case "${mode}" in
|
|||||||
fi
|
fi
|
||||||
old=$1
|
old=$1
|
||||||
new=$2
|
new=$2
|
||||||
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
|
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)([[:space:]]|$)?,$new\2,g" "$file"; done
|
||||||
;;
|
;;
|
||||||
--image)
|
--image)
|
||||||
if [ $# -lt 1 ] ; then
|
if [ $# -lt 1 ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user