From c91ea112d542826960446c5f5328de11b3ca8897 Mon Sep 17 00:00:00 2001 From: Nick Retel Date: Fri, 11 Oct 2024 10:01:09 +0200 Subject: [PATCH] Support deploying without a Dockerfile --- lib/actions/deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/actions/deploy.sh b/lib/actions/deploy.sh index ffafee7b..163089f2 100755 --- a/lib/actions/deploy.sh +++ b/lib/actions/deploy.sh @@ -192,7 +192,10 @@ action_deploy() { } # Check if any Dockerfiles exist + set +e dockerfiles=$(ls Dockerfile* 2>/dev/null) + set -e + if [[ -n "$dockerfiles" ]]; then # Bring up a local docker registry if [ -z "$(docker ps -q -f name=$spin_registry_name)" ]; then @@ -225,8 +228,7 @@ action_deploy() { fi done else - echo "${BOLD}${RED} No Dockerfiles found in the directory. Be sure you're running this command from the project root.${RESET}" - exit 1 + echo "${BOLD}${BLUE}🐳 No Dockerfiles found in the directory. Skipping building image...${RESET}" fi # Prepare SSH connection