Skip to content

Commit

Permalink
Skip Git hook repository check to enable build without .git (#301)
Browse files Browse the repository at this point in the history
The build process would fail if the `.git/` directory is missing, e. g. when downloading the repository contents from GitHub in a ZIP archive:
```text
[ERROR] Failed to execute goal io.github.phillipuniverse:githook-maven-plugin:1.0.5:install (default) on project openapi-diff-parent: Not a git repository, could not find a .git/hooks directory anywhere in the hierarchy of /path/to/openapi-diff/target. Turn off this behavior with skipRepositoryCheck=false -> [Help 1]
```

After the change, a missing `.git/` directory doesn't lead to a build failure:
```text
[INFO] --- githook-maven-plugin:1.0.5:install (default) @ openapi-diff-parent ---
[INFO] No .git directory found, skipping plugin execution
```

Refs #299
  • Loading branch information
joschi committed Dec 12, 2021
1 parent 7614541 commit d2a96f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@
<goal>install</goal>
</goals>
<configuration>
<skipRepositoryCheck>true</skipRepositoryCheck>
<hooks>
<pre-commit>
mvn com.coveo:fmt-maven-plugin:format
Expand Down

0 comments on commit d2a96f1

Please sign in to comment.