I'm using a gitjs shell script like this :

#!/bin/sh
TAG_START=$1
TAG_END=$2

function escape_chars { sed -r -e 's/(["\\])/\\\1/g' -e 's/\t/ /g' }
function format {
sha=$(git log -n1 --pretty=format:%h $1 | escape_chars)
message=$(git log -n1 --pretty=format:%s $1 | escape_chars)
author=$(git log -n1 --pretty=format:'%aN' $1 | escape_chars)
commit=$(git log -n1 --pretty=format:%H $1 | escape_chars)
date=$(git log -n1 --pretty=format:%ai $1 | escape_chars)
echo "{\"sha\":\"$sha\",\"message\":\"$message\",\"author\":\"$author\",\"commit\":\"$commit\",\"date\":\"$date\"},"
}

#echo "git log ${TAG_START}..${TAG_END}"

for hash in $(git rev-list ${TAG_START}..${TAG_END})
do
format $hash
done

maybe it can inspire you

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to