1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add a simple test for external renderer (#20033)

Fix #16402
This commit is contained in:
Lunny Xiao
2022-12-12 20:45:21 +08:00
committed by GitHub
parent 6398ca745a
commit 36a2d2f919
24 changed files with 178 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
data=$(cat)
exitcodes=""
hookname=$(basename $0)
GIT_DIR=${GIT_DIR:-$(dirname $0)}
for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
test -x "${hook}" && test -f "${hook}" || continue
echo "${data}" | "${hook}"
exitcodes="${exitcodes} $?"
done
for i in ${exitcodes}; do
[ ${i} -eq 0 ] || exit ${i}
done