working on changeLog creation
This commit is contained in:
parent
05cd6b85f6
commit
506f48357c
2 changed files with 2 additions and 14 deletions
|
@ -1 +1 @@
|
||||||
git log --pretty="%s" >> changeLog.txt
|
git log --pretty="%s" --since="`date -r ./../lastSuccessful/build.xml "+%F %T"`" >> changeLog.txt
|
14
gitLog.sh
14
gitLog.sh
|
@ -1,13 +1 @@
|
||||||
#!/bin/sh
|
git log --pretty="%s" --since="`date -r ./../lastSuccessful/build.xml "+%F %T"`" >> changeLog.txt
|
||||||
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
|
|
Loading…
Reference in a new issue