Selaa lähdekoodia

add git hook installation

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 vuotta sitten
vanhempi
commit
0f4f04da8d
2 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa
  1. 9 0
      CONTRIBUTING.md
  2. 8 0
      app/build.gradle

+ 9 - 0
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```.

+ 8 - 0
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 {