working on changeLog creation

This commit is contained in:
DarkGuardsman 2013-09-06 20:39:54 -04:00
parent 05cd6b85f6
commit 506f48357c
2 changed files with 2 additions and 14 deletions

View file

@ -1 +1 @@
git log --pretty="%s" >> changeLog.txt
git log --pretty="%s" --since="`date -r ./../lastSuccessful/build.xml "+%F %T"`" >> changeLog.txt

View file

@ -1,13 +1 @@
#!/bin/sh
GIT_LOG_FORMAT="%ai %an: %s"
USER=<username>
API_TOKEN=<api_token>
LAST_SUCCESS_URL_SUFFIX="lastSuccessfulBuild/api/xml"
#JOB_URL gets populated by Jenkins as part of the build environment
URL="$JOB_URL$LAST_SUCCESS_URL_SUFFIX"
LAST_SUCCESS_REV=$(curl --silent --user $USER:$API_TOKEN $URL | grep "<lastBuiltRevision>" | sed 's|.*<lastBuiltRevision>.*<SHA1>\(.*\)</SHA1>.*<branch>.*|\1|')
# Pulls all commit comments since the last successfully built revision
LOG=$(git log --pretty="$GIT_LOG_FORMAT" $LAST_SUCCESS_REV..HEAD)
echo $LOG
git log --pretty="%s" --since="`date -r ./../lastSuccessful/build.xml "+%F %T"`" >> changeLog.txt