terraform-provider-gitea/examples/pre-receive.sh
techknowlogick cc8760c9fd lerentis's changes (#12)
Changes from lerentis's fork.

Co-authored-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
Reviewed-on: gitea/terraform-provider-gitea#12
2023-09-06 01:44:01 +00:00

9 lines
201 B
Bash

#!/bin/bash
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ "master" = "$branch" ]; then
echo "wrong branch"
exit 1
fi
done