From c2ed1310327b6324b98e44827d6fa04535cbcc9c Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 15 Sep 2014 18:50:06 +0200 Subject: [PATCH] Added support for Redmine --- src/deforaos-git-hook.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/deforaos-git-hook.sh b/src/deforaos-git-hook.sh index 76f1249..5bd2020 100755 --- a/src/deforaos-git-hook.sh +++ b/src/deforaos-git-hook.sh @@ -20,6 +20,7 @@ #variables GITWEB= PROGNAME="deforaos-git-hook.sh" +REDMINE= #executables GIT="git" SED="sed" @@ -169,9 +170,10 @@ _link() { repository="$1" rev="$2" + shortrev=$(_shorten 8 "$rev") - [ -n "$GITWEB" ] || return 0 - echo "$GITWEB?p=${GL_REPO}.git;a=commit;h=$(_shorten 8 "$rev")" + [ -n "$GITWEB" ] && echo "$GITWEB?p=${repository}.git;a=commit;h=$shortrev" + [ -n "$REDMINE" ] && echo "$REDMINE/projects/${repository%.git}/repository/revisions/$shortrev" }