Clean up run-tests syntax

This commit is contained in:
w0rp 2023-02-13 04:24:54 +00:00
parent 9c45358aab
commit ab7757b532
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83

View File

@ -166,8 +166,7 @@ download_image() {
docker pull "${image}:${image_tag}" &> /dev/null docker pull "${image}:${image_tag}" &> /dev/null
} }
if [ "$has_image" -eq 0 ] && ! download_image if [ "$has_image" -eq 0 ] && ! download_image; then
then
echo "Building run image ${image}:${image_tag}" echo "Building run image ${image}:${image_tag}"
build_args=( --build-arg GIT_VERSION="$git_version" ) build_args=( --build-arg GIT_VERSION="$git_version" )
@ -182,8 +181,7 @@ then
docker build "${build_args[@]}" -t "${image}:${image_tag}" . docker build "${build_args[@]}" -t "${image}:${image_tag}" .
docker tag "${image}:${image_tag}" "${image}:latest" docker tag "${image}:${image_tag}" "${image}:latest"
if [[ -z "${DOCKER_HUB_USER:-}" || -z "${DOCKER_HUB_PASS:-}" ]] if [[ -z "${DOCKER_HUB_USER:-}" || -z "${DOCKER_HUB_PASS:-}" ]]; then
then
echo "Docker Hub credentials not set, skip push" echo "Docker Hub credentials not set, skip push"
else else
echo "Push ${image}:${image_tag} to Docker Hub" echo "Push ${image}:${image_tag} to Docker Hub"