From 73209cf48eabf665c65d05ff669f929c188220a9 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 24 Nov 2020 17:02:12 -0600 Subject: [PATCH] Meta: (pre-push) Only test before pushing master --- hooks/pre-push | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hooks/pre-push b/hooks/pre-push index 45ef92a..55236cb 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # * Commit parameters # Unused now, but good for future reference. See man 5 githooks. @@ -14,4 +14,9 @@ read local_ref local_sha remote_ref remote_sha # cause remote code to be downloaded and executed (i.e. what would # happen by installing packages). It can be done manually when needed. -make sandbox=.sandbox test +# Only run when pushing master. + +if [[ $local_ref = refs/heads/master ]] +then + make sandbox=.sandbox test +fi