Clean up run-tests syntax

This commit is contained in:
w0rp
2023-02-13 04:24:54 +00:00
parent 9c45358aab
commit ab7757b532

View File

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