From b9a393d10b5415ab684d2393e3c811eb30513ad9 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Thu, 23 Sep 2021 10:57:14 -0400 Subject: [PATCH] chore: Add pre-push hook --- .hooks/pre-push | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .hooks/pre-push diff --git a/.hooks/pre-push b/.hooks/pre-push new file mode 100755 index 000000000..1cb94652d --- /dev/null +++ b/.hooks/pre-push @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +remote="$1" +remote_url=$(git remote get-url $remote) + +if [[ $remote_url == *"boundary-enterprise"* ]]; then + exit 0 +fi + +if [ -f cmd/boundary/package_registration_ent.go ]; then + echo "Found enterprise file while pushing to oss remote" + exit 1 +fi + +exit 0