Skip to content

Commit 0c0c914

Browse files
committed
calculate-cache.sh: shfmt -s
Signed-off-by: Norio Nomura <[email protected]>
1 parent 0cb71c8 commit 0c0c914

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hack/calculate-cache.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function check_location() {
7373
location="$1"
7474
readonly cache_file="./.calculate-cache-response-cache.yaml"
7575
# check response_cache.yaml for the cache
76-
if [[ -f "${cache_file}" ]]; then
76+
if [[ -f ${cache_file} ]]; then
7777
cached=$(yq -e eval ".[\"${location}\"]" "${cache_file}" 2>/dev/null) && echo "${cached}" && return
7878
else
7979
touch "${cache_file}"
@@ -161,15 +161,15 @@ for cache_method in prior after; do
161161
for template in "${tepmlates_used_in_test_yml[@]}"; do
162162
location_digest_size_hash=$(print_location_digest_size_hash_from_template "${template}") || continue
163163
read -r location digest size hash containerd containerd_location containerd_digest containerd_size <<<"${location_digest_size_hash}"
164-
if [[ ${cache_method} = prior ]]; then
164+
if [[ ${cache_method} == prior ]]; then
165165
key=${runner_os}-${hash}
166-
elif [[ ${digest} = null ]]; then
166+
elif [[ ${digest} == null ]]; then
167167
key=image:$(basename "${location}")-url-sha256:$(echo -n "${location}" | sha256sum | cut -d' ' -f1)
168168
else
169169
key=image:$(basename "${location}")-${digest}
170170
fi
171-
if [[ ${containerd} = true ]]; then
172-
if [[ ${cache_method} = prior ]]; then
171+
if [[ ${containerd} == true ]]; then
172+
if [[ ${cache_method} == prior ]]; then
173173
# previous caching method packages the containerd archive with the image
174174
size=$((size + containerd_size))
175175
else

0 commit comments

Comments
 (0)