12345678910111213141516171819202122232425262728293031323334 |
- #!/bin/bash
- SUBMIT_HOST=192.168.1.100
- SUBMIT_PORT=5000
- GITURL="git@yourhost.domain:oz123/frank.git"
- JSON_TO_SUBMIT=""
- for HEAD in $@; do
-
- BRANCH=`basename $HEAD`
-
-
-
-
-
-
-
- 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}"\"
-
- JSON_TO_SUBMIT=$JSON_TO_SUBMIT{\"$BRANCH\":$REST_OF_JSON\}
- echo -e $JSON_TO_SUBMIT >> text
- JSON_TO_SUBMIT=$JSON_TO_SUBMIT,\\n
- REST_OF_JSON=""
- done
- printf "%b" $JSON_TO_SUBMIT
|