From f2c39e5b3ee29fc50954a47fd4df35e7ad66d657 Mon Sep 17 00:00:00 2001 From: Paul Bonaud Date: Mon, 5 Nov 2018 14:02:21 +0100 Subject: =?UTF-8?q?fix:=20=F0=9F=98=AC=20really=20fix=20the=20usage=20of?= =?UTF-8?q?=20"clever=5Fapp=5Froot"=20when=20waiting=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup after the fix of #15 it was still missing another case of "git" usage. This should be the last fix about this variable 🤞. --- files/clever-wait-deploy.sh | 8 +++++++- tasks/deploy.yml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 files/clever-wait-deploy.sh diff --git a/files/clever-wait-deploy.sh b/files/clever-wait-deploy.sh old mode 100644 new mode 100755 index c955f6a..e0bbcf1 --- a/files/clever-wait-deploy.sh +++ b/files/clever-wait-deploy.sh @@ -47,4 +47,10 @@ function check { deployed "$commit" } -check "$(git rev-parse HEAD)" +function getHeadRev { + local chdir="$1/.git" + + git --git-dir="$chdir" rev-parse HEAD +} + +check "$(getHeadRev "$@")" diff --git a/tasks/deploy.yml b/tasks/deploy.yml index ca8bf15..84ebe73 100644 --- a/tasks/deploy.yml +++ b/tasks/deploy.yml @@ -52,7 +52,7 @@ - skip_ansible_lint - name: Watch deployment status - command: clever-wait-deploy.sh + command: "clever-wait-deploy.sh '{{ clever_app_root }}'" async: 900 poll: 0 register: long_command -- cgit v1.2.3