rudikershaw / git-build-hook

A maven plugin for managing client side (local) git configuration for those working on your project. Including but not limited to setting git config, installing hooks, validating the local repository.
MIT License
138 stars 20 forks source link

Disable on CI #32

Closed jhonynet closed 2 years ago

jhonynet commented 2 years ago

Hi! There are some cases when this plugin needs to be disabled, for example, in continuous integration environment that does a git shallow clone and there is no need to configure any hook.

Maybe an environment variable that if is present the plugin won't run?

Regards!

rudikershaw commented 2 years ago

Hi there, I expect the feature you need already exists in Maven and doesn't need any changes to this plugin.

You can add Maven profiles to your project pom.xml. Simply set up a profile where the plugin is not active and run the build using that profile in your CI.

https://maven.apache.org/guides/introduction/introduction-to-profiles.html