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

Add classpath support for git hooks #21

Closed nhojpatrick closed 3 years ago

nhojpatrick commented 3 years ago

This PR is to add support to retreive git hooks from a dependency.

So something like this could automatically pick up any new hooks and install them via a new tld.example:company-git-hooks:1.x.x release.

<plugin>
    <groupId>com.rudikershaw.gitbuildhook</groupId>
    <artifactId>git-build-hook-maven-plugin</artifactId>
    <version>3.1.0-SNAPSHOT</version>
    <configuration>
        <installHooks>
            <pre-commit>company-pre-commit-hook</pre-commit>
        </installHooks>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>tld.example</groupId>
            <artifactId>company-git-hooks</artifactId>
            <version>[1.0.0,1.999.999)</version>
        </dependency>
    </dependencies>
</plugin>

Outstanding Tasks; [x] Clean Up Code for copying [x] Clean Up Code for setting exec bit if form classpath [x] Unit Testing [x] Check if commons-io is really need for Resource to File copying

nhojpatrick commented 3 years ago

I think this is ready for review now, i did create new tests but instead update the existing install-hook and reinstall-hook tests.

rudikershaw commented 3 years ago

Thanks very much. I'm hoping to find some time over the next couple of days where I can sit down and give this the time it deserves. Will keep you posted.

rudikershaw commented 3 years ago

Thanks again for your contribution. There are a few more things I want to attend to in this release, but after those are sorted I will see to getting this released in 3.1.0.