From fc52952914747dc937c805baa211a251a795b847 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Thu, 17 Nov 2016 23:18:40 +0100 Subject: git-receiver: allow users to re-run the last successful build running the pre-receive hook manually on the server will re-run the last successful build. --- tests/blogc-git-receiver/check_pre_receive.sh.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index 10fd4d9..b9aec45 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -143,4 +143,20 @@ grep "echo lol" "${TEMP}/output.txt" &> /dev/null [[ "${DEST}" != "$(readlink htdocs)" ]] [[ ! -e "${DEST}" ]] +DEST="$(readlink htdocs)" +HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt" + +[[ -h htdocs ]] +[[ "$(cat htdocs/foo.txt)" == "lol" ]] +[[ "${DEST}" != "$(readlink htdocs)" ]] +[[ ! -e "${DEST}" ]] + +DEST="$(readlink htdocs)" +HOME="${TEMP}" ${TESTS_ENVIRONMENT} ./hooks/pre-receive 2>&1 | tee "${TEMP}/output.txt" + +[[ -h htdocs ]] +[[ "$(cat htdocs/foo.txt)" == "lol" ]] +[[ "${DEST}" != "$(readlink htdocs)" ]] +[[ ! -e "${DEST}" ]] + rm "${TEMP}/output.txt" -- cgit v1.2.3-18-g5258