Name: puppet-git-hooks
Owner: CERN Operations
Description: Git client and server side hooks for puppet development
Created: 2015-05-08 09:07:58.0
Updated: 2018-02-26 09:16:07.0
Pushed: 2015-05-26 13:02:05.0
Homepage: null
Size: 163
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Git hooks to assist puppet module development. Client side hooks allow for various checks before commits are staged. Server side hooks are provided for infrastructural reinformence of various standardaizations compliance.
In your git repository you can symlink the pre-commit file from this repository to the .git/hooks/pre-commit of your repository you want to implement this feature.
-s /path/to/this/repo/puppet-git-hooks/pre-commit .git/hooks/pre-commit
If you are using git submodules this can be achieved by getting the gitdir from the .git file in your submodule and symlinking to that gitdir location/
t .git
-s /path/to/this/repo/puppet-git-hooks/pre-commit ../path/to/git/dir/from/previous/command/hooks/pre-commit
You could also create an alias in your bashrc file using the deploy-git-hook script from this repository. The deploy-git-hook script assumes you cloned the puppet-git-hooks repository in your $HOME directory for now.
ias deploy-git-hook='. /path/to/this/repo/puppet-git-hooks/deploy-git-hook'
When you added the alias and sourced your .bashrc file you can deploy the git hook by executing the command
ploy-git-hook
commit hook deployed to .git/hooks/pre-commit
The deploy script will figure out for you if it needs to deploy through a submodule or not.