#!/bin/sh

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" == "develop" ]; then
  echo "ERROR: You can't commit directly to the develop branch. Please do work on a feature branch."
  exit 1
fi

if [[ $branch == *RC ]]; then
  echo "ERROR: You can't commit directly to a RC branch. Please do work on a feature branch."
  exit 1
fi

top_level=`git rev-parse --show-toplevel`
$top_level/scripts/git-hooks/check_cli_doc.sh

