From b7e146862d34bdfc0cbfee8d4b140244f02e679d Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 31 Dec 2019 21:16:45 -0600 Subject: [PATCH] Meta: Add pre-push hook to repo This doesn't cause it to be run, of course, but it can be symlinked into place by the user. Better to commit it than to lose it by accident sometime. --- hooks/pre-push | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 hooks/pre-push diff --git a/hooks/pre-push b/hooks/pre-push new file mode 100755 index 0000000..34976fa --- /dev/null +++ b/hooks/pre-push @@ -0,0 +1,17 @@ +#!/bin/sh + +# * Commit parameters +# Unused now, but good for future reference. See man 5 githooks. + +remote="$1" +url="$2" + +read local_ref local_sha remote_ref remote_sha + +# * Run tests + +# Not using sandbox and auto-install, because "git push" shouldn't +# cause remote code to be downloaded and executed (i.e. what would +# happen by installing packages). It can be done manually when needed. + +make test