Skip to content

Commit

Permalink
Update pre-commit (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen authored Oct 18, 2023
1 parent d0363b2 commit 7bfd3c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 8 additions & 2 deletions pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/sh

echo "***** Check license before commit ******"
echo "***** Check license headers before commit *****"

./gradlew checkLicense
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
7 changes: 3 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down

0 comments on commit 7bfd3c4

Please sign in to comment.