From a9e0289159e72182ffd27abb37dd0adcb01d304b Mon Sep 17 00:00:00 2001 From: thopic Date: Tue, 11 Jul 2023 11:35:26 +0200 Subject: [PATCH] Improve post-receive hook messages --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3e61f0..f54a278 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ REMOTE="local" while read oldrev newrev ref do + echo "Ref $ref (${newrev:0:7}) received." # only checking out the master (or whatever branch you would like to deploy) if [ "$ref" = "refs/heads/master" ]; then @@ -24,13 +25,13 @@ do PROD_BR=`git rev-parse --abbrev-ref HEAD` if [ $PROD_BR != "master" ]; then - echo "Production repo is on $PROD_BR branch. Aborting..." + echo "Doing nothing: production repo is on $PROD_BR branch." else - echo "Ref $ref (${newrev:0:7}) received. Deploying master branch to production..." + echo "Deploying master branch to production..." git pull --ff-only $REMOTE master fi else - echo "Ref $ref received. Doing nothing: only the master branch may be deployed on this server." + echo "Doing nothing: only the master branch may be deployed on this server." fi done ```