diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2017-09-12 07:51:12 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-09-12 13:51:12 +0800 |
commit | 69dfe43ffc865bfa9c7a81375752d064a0013df3 (patch) | |
tree | 2aec741240b1fdfe88b4fed260239129a3c42541 /integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample | |
parent | eab4579e176c7b5bfdae6788c38cfba5a90712c6 (diff) | |
download | gitea-69dfe43ffc865bfa9c7a81375752d064a0013df3.tar.gz gitea-69dfe43ffc865bfa9c7a81375752d064a0013df3.zip |
Fix some tests : make coverage -> test (#2492)
* Fix test : make coverage -> test
* Refactor integration tests to be able to run them in parallel
* Add custom local repository temp path
Diffstat (limited to 'integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample')
-rwxr-xr-x | integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample new file mode 100755 index 0000000000..a1fd29ec14 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo16.git/hooks/pre-receive.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to make use of push options. +# The example simply echoes all push options that start with 'echoback=' +# and rejects all pushes when the "reject" push option is used. +# +# To enable this hook, rename this file to "pre-receive". + +if test -n "$GIT_PUSH_OPTION_COUNT" +then + i=0 + while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" + do + eval "value=\$GIT_PUSH_OPTION_$i" + case "$value" in + echoback=*) + echo "echo from the pre-receive-hook: ${value#*=}" >&2 + ;; + reject) + exit 1 + esac + i=$((i + 1)) + done +fi |