@@ -1,3 +1,4 @@
+$(shell scripts/git-hooks-init.sh)
REBAR_VERSION = 3.14.3-emqx-4
REBAR = $(CURDIR)/rebar3
BUILD = $(CURDIR)/build
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -euo pipefail
+url="$2"
+if [ -f 'EMQX_ENTERPRISE' ]; then
+ if [[ "$url" != *emqx-enterprise* ]]; then
+ echo "$(tput setaf 1)error: enterprise_code_to_non_enterprise_repo"
+ exit 1
+ fi
+fi
@@ -0,0 +1,13 @@
+if [ ! -d .git ]; then
+ exit 0
+mkdir -p ".git/hooks"
+if [ ! -L '.git/hooks/pre-push' ]; then
+ ln -sf '../../scripts/git-hook-pre-push.sh' '.git/hooks/pre-push'