From 76acac3564de7b19c30930e6814cbbc02c19f9cb Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Wed, 26 Jun 2024 11:42:56 -0700 Subject: [PATCH] fix: update Finch on Windows rootfs update workflow This change updates the find artifact in s3 utility function to use grep's extended regex and updates the rootfs and lima bundle filename patterns for it. Signed-off-by: Austin Vazquez --- bin/update-deps.sh | 4 ++-- bin/update-rootfs.sh | 2 +- bin/utility.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/update-deps.sh b/bin/update-deps.sh index d7735e4..7b346a3 100755 --- a/bin/update-deps.sh +++ b/bin/update-deps.sh @@ -16,8 +16,8 @@ PROJECT_ROOT="$(cd -- "${CURRENT_DIR}/.." && pwd)" source "${PROJECT_ROOT}/bin/utility.sh" DEPENDENCY_CLOUDFRONT_URL="https://deps.runfinch.com" -AARCH64_FILENAME_PATTERN="lima-and-qemu.macos-aarch64.[0-9].*\.gz$" -AMD64_FILENAME_PATTERN="lima-and-qemu.macos-x86_64.[0-9].*\.gz$" +AARCH64_FILENAME_PATTERN="lima-and-qemu.macos-aarch64\.[0-9]+\.tar\.gz$" +AMD64_FILENAME_PATTERN="lima-and-qemu.macos-x86_64\.[0-9]+\.tar\.gz$" AARCH64="aarch64" X86_64="x86-64" diff --git a/bin/update-rootfs.sh b/bin/update-rootfs.sh index 51b1619..389441f 100755 --- a/bin/update-rootfs.sh +++ b/bin/update-rootfs.sh @@ -16,7 +16,7 @@ PROJECT_ROOT="$(cd -- "${CURRENT_DIR}/.." && pwd)" source "${PROJECT_ROOT}/bin/utility.sh" DEPENDENCY_CLOUDFRONT_URL="https://deps.runfinch.com" -AMD64_FILENAME_PATTERN="finch-rootfs-production-amd64-[0-9]+\.tar.gz" +AMD64_FILENAME_PATTERN="finch-rootfs-production-amd64-[0-9]+\.tar\.gz$" PLATFORM="common" # ARM not currently supported for Finch on Windows # AARCH64="aarch64" diff --git a/bin/utility.sh b/bin/utility.sh index 88a7b22..de2b0b4 100644 --- a/bin/utility.sh +++ b/bin/utility.sh @@ -14,7 +14,7 @@ find_latest_object_match_from_s3() { local object_pattern="$1" local s3_bucket="$2" - object=$(aws s3 ls "s3://${s3_bucket}" --recursive | grep "${object_pattern}" | sort | tail -n 1 | awk '{print $4}') + object=$(aws s3 ls "s3://${s3_bucket}" --recursive | grep -E "${object_pattern}" | sort | tail -n 1 | awk '{print $4}') if [[ -z "$object" ]]; then echo "error: no match found for pattern ${object_pattern}" exit 1