From 4483bb9cdc1031a85a3a1fc1ea186a7390c807ba Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Fri, 30 Nov 2018 16:53:40 +0100 Subject: fix(deploy): Yet again a missing chdir to execute from app root --- files/clever-wait-deploy.sh | 6 ++---- tasks/deploy.yml | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/clever-wait-deploy.sh b/files/clever-wait-deploy.sh index e0bbcf1..b911069 100755 --- a/files/clever-wait-deploy.sh +++ b/files/clever-wait-deploy.sh @@ -48,9 +48,7 @@ function check { } function getHeadRev { - local chdir="$1/.git" - - git --git-dir="$chdir" rev-parse HEAD + git rev-parse HEAD } -check "$(getHeadRev "$@")" +check "$(getHeadRev)" diff --git a/tasks/deploy.yml b/tasks/deploy.yml index 3bd74ee..ae7e5f6 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -58,7 +58,9 @@ - skip_ansible_lint - name: Watch deployment status - command: "clever-wait-deploy.sh '{{ clever_app_root }}'" + command: "clever-wait-deploy.sh" + args: + chdir: "{{ clever_app_root }}" async: 900 poll: 0 register: long_command -- cgit v1.2.3