]> git.immae.eu Git - github/fretlink/ansible-clever.git/commitdiff
fix: 😬 really fix the usage of "clever_app_root" when waiting deploy 16/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 5 Nov 2018 13:02:21 +0000 (14:02 +0100)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Mon, 5 Nov 2018 13:25:01 +0000 (14:25 +0100)
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 [changed mode: 0644->0755]
tasks/deploy.yml

old mode 100644 (file)
new mode 100755 (executable)
index c955f6a..e0bbcf1
@@ -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 "$@")"
index ca8bf15c6a6d316adc4bbdeeaa2fdfdf5b600147..84ebe737b8bc3c6a64094c928dab841bf72141d7 100644 (file)
@@ -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