dgiot/scripts/git-hook-pre-push.sh

17 lines
370 B
Bash
Raw Normal View History

2021-05-18 14:54:48 +08:00
#!/usr/bin/env bash
set -euo pipefail
url="$2"
2022-12-29 18:13:09 +08:00
## ensure enterprise code is not pushed to public repo
2021-05-18 14:54:48 +08:00
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
2022-12-29 18:13:09 +08:00
## this triggers a tag vs release version check before pushing a tag
./pkg-vsn.sh