From 7bfd3c434a8a179ae5da5729dd59ae03607ebdee Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Wed, 18 Oct 2023 15:19:59 +0300 Subject: [PATCH] Update pre-commit (#193) --- pre-commit | 10 ++++++++-- settings.gradle.kts | 7 +++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pre-commit b/pre-commit index d9d6d5f13..b44cb8a49 100644 --- a/pre-commit +++ b/pre-commit @@ -1,5 +1,11 @@ #!/bin/sh -echo "***** Check license before commit ******" +echo "***** Check license headers before commit *****" -./gradlew checkLicense \ No newline at end of file +if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then + ./gradlew.bat checkLicense +elif [ "$(expr substr $(uname -s) 1 4)" == "MSYS" ]; then + ./gradlew.bat checkLicense +else + ./gradlew checkLicense +fi diff --git a/settings.gradle.kts b/settings.gradle.kts index aa6b6635f..0d7d94b90 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,7 +2,7 @@ rootProject.name = "jacodb" plugins { `gradle-enterprise` - id("org.danilopianini.gradle-pre-commit-git-hooks") version "1.0.25" + id("org.danilopianini.gradle-pre-commit-git-hooks") version "1.1.11" } gradleEnterprise { @@ -14,10 +14,9 @@ gradleEnterprise { gitHooks { preCommit { - // Content can be added at the bottom of the script - from(file("pre-commit").toURI().toURL()) + from(file("pre-commit")) } - createHooks() // actual hooks creation + createHooks(true) } include("jacodb-api")