post-update.sh 536 B

1234567891011121314151617
  1. # This script is copyright Oz N Tiram <nahumoz@gmail.com>
  2. # It is distributed under the terms of GPLv3
  3. #!/bin/bash
  4. HEAD=$1
  5. # CUT, UNIX
  6. # BRANCH=$(echo $1 |cut -d / -f 3)
  7. #FUCK BASHSIMS
  8. IFS="/"
  9. BRANCH=($1)
  10. BRANCH=${BRANCH[2]}
  11. 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" }')
  12. REST_OF_JSON=$REST_OF_JSON:"branch:"${BRANCH}"}"
  13. echo $REST_OF_JSON > /home/ozn/bla