Notify scripts: new abbrev tag simplification
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user