From 57ad7cd1d8fd20a0d093ec48ae027cc9c5bf9db9 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Mon, 2 Dec 2019 13:41:38 +0100
Subject: [PATCH] fix error in .gitlab-ci.yml

---
 .gitlab-ci.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 494382631..5d78908e7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,7 +46,7 @@ create-vps:
         echo "Running python script"
         # Check if the cached machine still exists in the Greenhost cloud and
         # it's the same machine.
-        if python3 << EOF
+        if python3 << EOF; then
       import greenhost_cloud
       machine = greenhost_cloud.get_droplets_by_name("^${HOSTNAME}$")[0]
       print("Machine status is {}".format(machine['status']))
@@ -54,8 +54,7 @@ create-vps:
       if machine['status'] != 'running' or \
               machine['networks']['v4'][0]['ip_address'] != '${IP_ADDRESS}':
           exit(1)
-      EOF;
-        then
+      EOF
           # Delete old machine if it still exists
           echo "Deleting old machine"
           python3 -c "import greenhost_cloud; greenhost_cloud.terminate_droplets_by_name(\"^${HOSTNAME}$\")"
-- 
GitLab