open-vault/.hooks/pre-push

24 lines
360 B
Plaintext
Raw Normal View History

2017-09-04 23:16:11 +00:00
#!/bin/sh
remote="$1"
remote_url=$(git remote get-url $remote)
if [[ $remote_url == *"vault-enterprise"* ]]; then
exit 0
fi
2017-09-04 23:16:11 +00:00
2017-09-04 23:20:39 +00:00
if [ "$remote" = "enterprise" ]; then
2017-09-04 23:16:11 +00:00
exit 0
fi
2018-09-18 03:03:00 +00:00
if [ "$remote" = "ent" ]; then
exit 0
fi
2019-04-16 17:50:38 +00:00
if [ -f command/version_ent.go ]; then
2017-09-04 23:16:11 +00:00
echo "Found enterprise version file while pushing to oss remote"
exit 1
fi
exit 0