Added support for Redmine

This commit is contained in:
Pierre Pronchery 2014-09-15 18:50:06 +02:00
parent d9aa6a94a5
commit c2ed131032

View File

@ -20,6 +20,7 @@
#variables #variables
GITWEB= GITWEB=
PROGNAME="deforaos-git-hook.sh" PROGNAME="deforaos-git-hook.sh"
REDMINE=
#executables #executables
GIT="git" GIT="git"
SED="sed" SED="sed"
@ -169,9 +170,10 @@ _link()
{ {
repository="$1" repository="$1"
rev="$2" rev="$2"
shortrev=$(_shorten 8 "$rev")
[ -n "$GITWEB" ] || return 0 [ -n "$GITWEB" ] && echo "$GITWEB?p=${repository}.git;a=commit;h=$shortrev"
echo "$GITWEB?p=${GL_REPO}.git;a=commit;h=$(_shorten 8 "$rev")" [ -n "$REDMINE" ] && echo "$REDMINE/projects/${repository%.git}/repository/revisions/$shortrev"
} }