Skip to content

Instantly share code, notes, and snippets.

@svx
Last active October 21, 2015 07:19
Show Gist options
  • Select an option

  • Save svx/6fe3cc77fb9f2bb8d805 to your computer and use it in GitHub Desktop.

Select an option

Save svx/6fe3cc77fb9f2bb8d805 to your computer and use it in GitHub Desktop.
This is a git pre-commit hook, which can be handy sometimes
#!/bin/sh
#
# Run some tests, on commit, that we may catch some bugs before travis does.
# We like color output
# Colors
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
echo "${red}Do not forget to update the docs!${reset}"
# Testing docs
echo "${green} Running tests against documentation...${reset}"
make -C docs testdocs
# Testing Ansible syntax
echo "${green} Running syntax checks against Ansible roles...${reset}"
make -C ansible ansible-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment