Simplify build script

This commit is contained in:
Christian Mäder 2021-03-14 17:40:50 +01:00 committed by cimnine
parent 7e78ca7f61
commit 1bc6844c66
1 changed files with 106 additions and 107 deletions

View File

@ -275,7 +275,6 @@ echo "🏭 Building the following targets:" "${DOCKER_TARGETS[@]}"
###
# Build each target
###
export DOCKER_BUILDKIT=${DOCKER_BUILDKIT-1}
for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
echo "🏗 Building the target '${DOCKER_TARGET}'"
@ -379,7 +378,9 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
if [ "${SHOULD_BUILD}" != "true" ]; then
echo "⏯ Build skipped because sources didn't change"
echo "::set-output name=skipped::true"
else
continue
fi
###
# Composing all arguments for `docker build`
###
@ -428,7 +429,6 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
if [ -n "${DOCKER_FROM}" ]; then
DOCKER_BUILD_ARGS+=(--build-arg "FROM=${DOCKER_FROM}")
fi
# shellcheck disable=SC2031
if [ -n "${HTTP_PROXY}" ]; then
DOCKER_BUILD_ARGS+=(--build-arg "http_proxy=${HTTP_PROXY}")
DOCKER_BUILD_ARGS+=(--build-arg "https_proxy=${HTTPS_PROXY}")
@ -495,5 +495,4 @@ for DOCKER_TARGET in "${DOCKER_TARGETS[@]}"; do
echo "👷 Removing Buildx Builder '${BUILDX_BUILDER_NAME}'"
$DRY docker buildx rm "${BUILDX_BUILDER_NAME}"
fi
fi
done