summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-10-12 13:30:56 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-10-12 13:30:56 +0200
commit5554c9c698733120d1ea21b5bf50230cefcb7294 (patch)
tree4bc3337fd8a5686e79a19774e1b89b817499900b
parent5eae6db86b483413af605dc1fa8ff6fb1daa1dbb (diff)
CI: don’t run it except on master
-rwxr-xr-xhooks/update7
1 files changed, 7 insertions, 0 deletions
diff --git a/hooks/update b/hooks/update
index 63b33e7..6dfa013 100755
--- a/hooks/update
+++ b/hooks/update
@@ -21,6 +21,13 @@ oldrev="$2"
newrev="$3"
zero=$(guix environment --ad-hoc git -- git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
span="^$oldrev $newrev"
+
+if test "x$refname" != "xrefs/heads/master"
+then
+ >&2 echo "No CI for $refname, it’s not master"
+ exit 0
+fi
+
if test "x$oldrev" = "x$zero"
then
>&2 echo "Creating a new branch, $refname..."