Skip to content

Instantly share code, notes, and snippets.

View reidbaker's full-sized avatar

Reid Baker reidbaker

  • Google
  • Atlanta GA
View GitHub Profile
@reidbaker
reidbaker / check_for_git_hooks.gradle
Last active February 25, 2016 02:51 — forked from tmelz/check_for_git_hooks.gradle
fail the gradle build if git-hooks don't exist
// Apply by adding the following line to your build.gradle:
// apply from: 'scripts/check_for_git_hooks.gradle'
// Comment out any hook files that aren't relevant for you.
final GIT_HOOK_DIR = ".git/hooks/"
final IGNORE_HOOKS_FLAG = "ignoreMissingHooks"
final GIT_HOOK_FILES = [
"applypatch-msg",
"commit-msg",
"post-applypatch",
"post-checkout",