chore(pre-commit): fail if mvn is not installed, add brew install maven to Makefile (#53175)
This commit is contained in:
@@ -53,7 +53,7 @@ repos:
|
||||
|
||||
- id: spotless
|
||||
name: Format Java files with Spotless
|
||||
entry: bash -c 'command -v mvn >/dev/null 2>&1 || { if [ -z "$CI" ]; then echo "Maven not installed, skipping spotless" >&2; exit 0; fi }; mvn -f spotless-maven-pom.xml spotless:apply'
|
||||
entry: bash -c 'command -v mvn >/dev/null 2>&1 || { echo "Maven not installed. Install with brew install maven" >&2; exit 1; }; mvn -f spotless-maven-pom.xml spotless:apply'
|
||||
language: system
|
||||
files: \.(java|kt|gradle)$
|
||||
pass_filenames: false
|
||||
|
||||
2
Makefile
2
Makefile
@@ -36,7 +36,7 @@ tools.pre-commit.install.Linux:
|
||||
|
||||
tools.pre-commit.install.Darwin:
|
||||
@echo "Installing pre-commit with brew..."
|
||||
@brew install pre-commit
|
||||
@brew install pre-commit maven
|
||||
@echo "Pre-commit installation complete"
|
||||
|
||||
tools.git-hooks.install: tools.airbyte-ci.install tools.pre-commit.install.$(OS) tools.git-hooks.clean ## Setup pre-commit hooks
|
||||
|
||||
Reference in New Issue
Block a user