From f24b8adb14ebdc2b0ddd7cfbf903c1e25c18756b Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Tue, 20 Feb 2024 12:29:27 +0000 Subject: [PATCH] Refactor build-and-test.sh script Signed-off-by: Jacob Woffenden --- scripts/build-and-test.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build-and-test.sh b/scripts/build-and-test.sh index 913a95a..15a2fed 100644 --- a/scripts/build-and-test.sh +++ b/scripts/build-and-test.sh @@ -8,12 +8,14 @@ if [[ "${REMOTE_CONTAINERS}" ]] && [[ "$(uname -m)" == "aarch64" ]]; then echo "(⚠) This script builds linux/amd64 images which might take a long time or even fail." export PLATFORM_FLAG="--platform linux/amd64" fi -# shellcheck disable=SC2086 special case for PLATFORM_FLAG +# shellcheck disable=SC2086 +# special case for PLATFORM_FLAG as it can't parse double quotes docker build ${PLATFORM_FLAG} --file Dockerfile --tag "${IMAGE_TAG}" . echo "Running container structure test for [ ${IMAGE_TAG} ]" -# shellcheck disable=SC2086 special case for PLATFORM_FLAG +# shellcheck disable=SC2086 +# special case for PLATFORM_FLAG as it can't parse double quotes docker run --rm ${PLATFORM_FLAG} \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "${PWD}:/workspace" \