Commit ac7050b2 authored by Christoph Kepler's avatar Christoph Kepler

Pre-Receive Hook

parents
#!/bin/bash
read oldrev newrev refname
branch="$(git symbolic-ref HEAD)"
if [ "$refname" == "$branch" ]; then
echo >&2 "***********************************************************"
echo >&2 "* *"
echo >&2 "* You pushed correctly master. The operator salutes you!! *"
echo >&2 "* *"
echo >&2 "***********************************************************"
exit 0
else
echo >&2 "***********************************************************"
echo >&2 "* *"
echo >&2 "* Warning!!! *"
echo >&2 "* This is the testserver. Please only push master branch. *"
echo >&2 "* Try again with: *"
echo >&2 "* >_ git push testserver master *"
echo >&2 "* *"
echo >&2 "***********************************************************"
exit -1
fi
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment