Skip to content

Commit c620767

Browse files
committed
update-template-{alpine,fedora}.sh: fix default value of overriding
`overriding` may be empty when called from `update-template.sh` Signed-off-by: Norio Nomura <[email protected]>
1 parent 6a0479b commit c620767

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hack/update-template-alpine.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function alpine_cache_key_for_image_kernel() {
131131
}
132132
133133
function alpine_image_entry_for_image_kernel() {
134-
local location=$1 kernel_is_not_supported=$2 overriding=${3:-"{}"} url_spec image_entry=''
134+
local location=$1 kernel_is_not_supported=$2 overriding=${3:-'{"path_version":"latest-stable"}'} url_spec image_entry=''
135135
[[ ${kernel_is_not_supported} == "null" ]] || echo "Updating kernel information is not supported on Alpine Linux" >&2
136136
url_spec=$(alpine_url_spec_from_location "${location}" | jq -r ". + ${overriding}")
137137
image_entry=$(alpine_latest_image_entry_for_url_spec "${url_spec}")

hack/update-template-fedora.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function fedora_cache_key_for_image_kernel() {
152152
}
153153
154154
function fedora_image_entry_for_image_kernel() {
155-
local location=$1 kernel_is_not_supported=$2 overriding=${3:-"{}"} url_spec image_entry=''
155+
local location=$1 kernel_is_not_supported=$2 overriding=${3:-'{"path_version":"releases/\\d+"}'} url_spec image_entry=''
156156
[[ ${kernel_is_not_supported} == "null" ]] || echo "Updating kernel information is not supported on Fedora Linux" >&2
157157
url_spec=$(fedora_url_spec_from_location "${location}" | jq -r ". + ${overriding}")
158158
image_entry=$(fedora_latest_image_entry_for_url_spec "${url_spec}")
@@ -186,7 +186,7 @@ else
186186
fi
187187
188188
declare -a templates=()
189-
declare overriding='{"path_version":"releases/\\d+"}'
189+
declare overriding='{}'
190190
while [[ $# -gt 0 ]]; do
191191
case "$1" in
192192
-h | --help)

0 commit comments

Comments
 (0)