aboutsummaryrefslogtreecommitdiffstats
path: root/tests/blogc-git-receiver
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-11-17 23:18:40 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-11-17 23:18:40 +0100
commitfc52952914747dc937c805baa211a251a795b847 (patch)
treea32459b3bc63106dc049710b0b60878f253a7767 /tests/blogc-git-receiver
parent984fa87451c9dd3ef2d9ec7976af97ce88bac6d7 (diff)
downloadblogc-fc52952914747dc937c805baa211a251a795b847.tar.gz
blogc-fc52952914747dc937c805baa211a251a795b847.tar.bz2
blogc-fc52952914747dc937c805baa211a251a795b847.zip
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.
Diffstat (limited to 'tests/blogc-git-receiver')
-rwxr-xr-xtests/blogc-git-receiver/check_pre_receive.sh.in16
1 files changed, 16 insertions, 0 deletions
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"