revans / Githooks

Adds post commit hooks to your .git/hooks directory.

This URL has Read+Write access

revans (author)
Fri Jun 12 09:29:53 -0700 2009
commit  5fee3a86d2f7d35f6f3eeea85e9d9a7586be0ca6
tree    249b93b8f6feb8a4c0e99fa3f5894b61d0892790
parent  e97688a6fa74f11a4af99d803c8db529c2570920
name age message
file .gitignore Fri Jun 12 09:11:04 -0700 2009 Githooks is now configurable [revans]
file CHANGELOG.rdoc Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
file LICENSE Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
file README.textile Fri Jun 12 09:29:53 -0700 2009 Adding space for the code view [revans]
file Rakefile Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
directory bin/ Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
file githooks.gemspec Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
directory lib/ Fri Jun 12 09:17:08 -0700 2009 removing passwords [revans]
directory spec/ Thu Jun 11 15:15:05 -0700 2009 Initial creation [revans]
README.textile

Githooks

Githooks is a gem that creates post-commit hooks for your application – if you are using git, of course. ;) Currently, it is just creating a post-commit hook to a campfire room of your choosing. That’s all I need it for, for now.

How to Use

Install the gem: sudo gem install revans-githooks

Once installed, cd to the root of your project directory and do the following:


githooks project_name --login your_campfire_login --pass campfire_password --domain campfire_subdmain --room "campfire room name"

This is a pretty log command, so I’d suggest writing a bash script where you can put in the login, password, domain and room details and just pass the project name to githooks. Here is what I have in my ~/.bash_profile:


function campfire_hook {
  githooks $1 --login robo@facollective.com --pass password --domain facollective --room "War Room"
}

Then I can just do campfire_hook project_name.

That’s about it. I’m sure I’ll be adding more to this as we have the need. If you feel you need more hooks, fork it and submit patches. Cheers!