From: Paul Bonaud Date: Fri, 30 Nov 2018 15:53:40 +0000 (+0100) Subject: fix(deploy): Yet again a missing chdir to execute from app root X-Git-Tag: v1.13~2^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=refs%2Fpull%2F27%2Fhead;p=github%2Ffretlink%2Fansible-clever.git fix(deploy): Yet again a missing chdir to execute from app root --- 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