diff --git a/checker/notify-commit b/checker/notify-commit index de17493..5cf487b 100755 --- a/checker/notify-commit +++ b/checker/notify-commit @@ -5,7 +5,10 @@ # # COMMIT - hash of commit # COMMIT_AUTHOR - author of commit +# COMMIT_ABBREV - abbreviated sha +# COMMIT_LOG - short line of commit log # COMMIT_BRANCH - name of branch # PROJECT_NAME - project name specified in cloner.cfg echo "Commit: ($COMMIT: (AUTHOR=$COMMIT_AUTHOR; BRANCH=$COMMIT_BRANCH), Project: $PROJECT_NAME)" +echo -e "\t$COMMIT_ABBREV: $COMMIT_LOG" diff --git a/checker/notify-tag b/checker/notify-tag index 11aeb92..bbea1af 100755 --- a/checker/notify-tag +++ b/checker/notify-tag @@ -1,4 +1,4 @@ -#!/bin/bash +#/bin/bash # notify on tag push (new tag or change) # # Parameters (via env) @@ -6,6 +6,9 @@ # TAG_HASH - hash of tagged commit # TAG_NAME - tag label # TAG_AUTHOR - who authored the tag - if available +# TAG_ABBREV - commit abbreviated hash +# TAG_LOG - short status line of log # PROJECT_NAME - name of project specified in cloner.cfg echo "TAG: (Name=$TAG_NAME; AUTHOR=$TAG_AUTHOR; SHA: $TAG_HASH), PROJECT: $PROJECT_NAME" +echo -e "\t$TAG_ABBREV: $TAG_LOG" diff --git a/checker/run-checker b/checker/run-checker index bf4cc2b..8b44399 100755 --- a/checker/run-checker +++ b/checker/run-checker @@ -101,17 +101,23 @@ do # COMMIT = $commitId # COMMIT_AUTHOR = $author author=$(git --git-dir $repodir log $commitId -1 --format="%an <%ae>") + # COMMIT_ABBREV + abbr=$(git --git-dir $repodir log $commitId -1 --format="%h") + # COMMIT_LOG + log=$(git --git-dir $repodir log $commitId -1 --format="%s") # BRANCH = $branch # PORJECT_NAME = $cloner_project_name set +e - env COMMIT="$commitId" \ + COMMIT="$commitId" \ COMMIT_AUTHOR="$author" \ COMMIT_BRANCH="$branch" \ + COMMIT_ABBREV="$abbr" \ + COMMIT_LOG="$log" \ PROJECT_NAME="$cloner_project_name" \ notify-commit - rc=$? - [ $rc -eq 0 ] || echo "Notify $branch/$commitId: return code = $rc" + rc=$? + [ $rc -eq 0 ] || echo "Notify $branch/$commitId: return code = $rc" set -e detectorSaveCommit $commitId fi @@ -144,15 +150,20 @@ do # TAG_NAME = $tagname # TAG_AUTHOR author=$(git --git-dir $repodir log $newsha -1 --pretty=format:"%an <%ae>") + # TAG_ABBREV + abbr=$(git --git-dir $repodir log $newsha -1 --format="%h") + # TAG_LOG + log=$(git --git-dir $repodir log $newsha -1 --format="%s") # PROJECT_NAME = $cloner_project_name - + # call the notify script set +e - env TAG_HASH="$newsha" \ + TAG_HASH="$newsha" \ TAG_NAME="$tagname" \ TAG_AUTHOR="$author" \ - PROJECT_NAME="$cloner_project_name" \ - notify-tag + TAG_ABBREV="$abbr" \ + TAG_LOG="$log" \ + PROJECT_NAME="$cloner_project_name" notify-tag rc=$? [ $rc -eq 0 ] || echo "Notify $tagname: return code = $rc" set -e