diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-01-04 00:07:31 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-01-04 00:07:31 +0100 |
commit | 77d89f64161e001c91fd7ca60e298a69d35e2050 (patch) | |
tree | b788d03eeabc69aac3b16fc72212ec50365591bc /tests/blogc-git-receiver/check_pre_receive.sh.in | |
parent | 0f6fe3e044519d15d1e54d3ef1088b5107bc21a9 (diff) | |
download | blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.tar.gz blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.tar.bz2 blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.zip |
git-receiver: detect if pre-receive is running from git using env var
Diffstat (limited to 'tests/blogc-git-receiver/check_pre_receive.sh.in')
-rwxr-xr-x | tests/blogc-git-receiver/check_pre_receive.sh.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index c2f57ac..ba3d78c 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -28,7 +28,7 @@ EOF cd "${TEMP}/repos/foo.git" -SHELL="${SELF}" HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" +SHELL="${SELF}" HOME="${TEMP}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" grep "warning: no reference to master branch found. nothing to deploy." "${TEMP}/output.txt" &> /dev/null cat > "${TEMP}/tmp.txt" <<EOF @@ -58,7 +58,7 @@ cat > "${TEMP}/payload.txt" <<EOF 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 refs/heads/bar EOF -SHELL="${SELF}" HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" +SHELL="${SELF}" HOME="${TEMP}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" grep "warning: no makefile found. skipping ..." "${TEMP}/output.txt" &> /dev/null cd "${TEMP}" @@ -93,7 +93,7 @@ cat > "${TEMP}/payload.txt" <<EOF 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 refs/heads/bar EOF -SHELL="${SELF}" HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" +SHELL="${SELF}" HOME="${TEMP}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" grep "echo lol" "${TEMP}/output.txt" &> /dev/null [[ -h htdocs ]] @@ -135,7 +135,7 @@ cat > "${TEMP}/payload.txt" <<EOF 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 refs/heads/bar EOF -SHELL="${SELF}" HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" +SHELL="${SELF}" HOME="${TEMP}" GIT_DIR=. ${TESTS_ENVIRONMENT} ./hooks/pre-receive < "${TEMP}/payload.txt" 2>&1 | tee "${TEMP}/output.txt" grep "echo lol" "${TEMP}/output.txt" &> /dev/null [[ -h htdocs ]] |