From 0f4f04da8d28a94e0a4aec785154428c8c8ba9fc Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Sun, 3 Apr 2022 11:54:19 +0200 Subject: [PATCH] add git hook installation Signed-off-by: Andy Scherzinger --- CONTRIBUTING.md | 9 +++++++++ app/build.gradle | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed99f7fad..caed3b868 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -141,6 +141,15 @@ If you set your `user.name` and `user.email` git configs, you can sign your comm You can also use git [aliases](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases) like `git config --global alias.ci 'commit -s'`. Now you can commit with `git ci` and the commit will be signed. +### Git hooks + +We provide git hooks to make development process easier for both the developer and the reviewers. +To install them, just run: + +```bash +./gradlew installGitHooks +``` + ## Contribution process Contribute your code targeting/based-on the branch ```master```. diff --git a/app/build.gradle b/app/build.gradle index 52063117a..5f89af1f5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -334,6 +334,14 @@ dependencies { gplayImplementation "com.google.firebase:firebase-messaging:23.0.0" } +task installGitHooks(type: Copy, group: "development") { + description = "Install git hooks" + from("../scripts/hooks") { + include '*' + } + into '../.git/hooks' +} + detekt { reports { xml {