aboutsummaryrefslogtreecommitdiffstats
path: root/build-logic/automation-plugins/src/main/kotlin/com.github.android-password-store.git-hooks.gradle.kts
blob: 6f661a6a5aa96924f7d285df27e996547ffcae1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * Copyright © 2014-2021 The Android Password Store Authors. All Rights Reserved.
 * SPDX-License-Identifier: GPL-3.0-only
 */

import tasks.GitHooks

tasks.register<GitHooks>("installGitHooks") {
  val projectDirectory = layout.projectDirectory
  hookScript.set(projectDirectory.file("scripts/pre-push-hook.sh").asFile.readText())
  hookOutput.set(projectDirectory.file(".git/hooks/pre-push").asFile)
}