From f122ef0d95c95a25c4a8ef1ff8643ea9e9413644 Mon Sep 17 00:00:00 2001 From: Hubbe Date: Sat, 2 Nov 2024 13:08:30 +0200 Subject: [PATCH] Special-case "latest" in CACHE_FROM in build script --- build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build b/build index 7ee598c..c4a2558 100755 --- a/build +++ b/build @@ -47,7 +47,11 @@ CACHE_ARGS=() if [ -n "${CACHE_FROM:-}" ]; then # Note lack of quotes here - we want to word split for commit in $CACHE_FROM; do - tag=$(git rev-parse --short "$commit") + if [ "$commit" == "latest" ]; then + tag="latest" + else + tag=$(git rev-parse --short "$commit") + fi for component in "${COMPONENTS[@]}"; do CACHE_IMAGES+=("$BASE/wubloader-$component:$tag") CACHE_ARGS+=("--cache-from" "$BASE/wubloader-$component:$tag")