Ver Fonte

fixes for post-update.sh hook

Oz N Tiram há 9 anos atrás
pai
commit
bc39bec1e5
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      hooks/post-update.sh

+ 4 - 1
hooks/post-update.sh

@@ -1,6 +1,9 @@
 # This script is copyright Oz N Tiram <nahumoz@gmail.com>
 # It is distributed under the terms of GPLv3
 
+# TODO: Fix the script for the case that more than 1  branches are pushed 
+# at once 
+
 #!/bin/bash
 HEAD=$1
 # CUT, UNIX
@@ -11,7 +14,7 @@ BRANCH=($1)
 BRANCH=${BRANCH[2]}
 
 REST_OF_JSON=$(git --no-pager log -n 1 --format='{"hashes":{"commit":"%H", "tree":"%T", "parents":"%P" }, "author":{"date": "%ai", "name":"%an", "email":"%ae" }, "committer":{"date": "%ci", "name": "%cn", "email":"%ce" }')
-REST_OF_JSON=$REST_OF_JSON:"branch:"${BRANCH}"}"
+REST_OF_JSON=$REST_OF_JSON,\"branch\":\""${BRANCH}"\""}"
 
 echo $REST_OF_JSON > /home/ozn/bla