Merge pull request #193 from dlorenc/test

Minor bugfix in help text test.
pull/190/head
dlorenc 2016-06-09 15:33:56 -07:00 committed by GitHub
commit cda67a4c15
1 changed files with 10 additions and 6 deletions

16
test.sh
View File

@ -53,11 +53,15 @@ fi
# Check that cobra docs are up to date
# This is done by generating new docs and then seeing if they are different than the committed docs
echo "Checking help documentation..."
go run gen_help_text.go
files=$(git diff)
if [[ $files ]]; then
echo "Help text is out of date: $files \n Please run \"go run gen_help_text.go\"\n and make sure that those doc changes are committed"
exit 1
if [[ $(git diff) ]]; then
echo "Skipping help text check because the git state is dirty."
else
echo "Help text is up to date"
go run gen_help_text.go
files=$(git diff)
if [[ $files ]]; then
echo "Help text is out of date: $files \n Please run \"go run gen_help_text.go\"\n and make sure that those doc changes are committed"
exit 1
else
echo "Help text is up to date"
fi
fi