Skip to content

Instantly share code, notes, and snippets.

@derencius
Created May 31, 2009 20:18
Show Gist options
  • Save derencius/121016 to your computer and use it in GitHub Desktop.
Save derencius/121016 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# This is the post receive script for git and integrity. Copy
# this script into the hooks directory of your gitosis managed
# repository and run 'chmod 750 post-receive'. Then your project
# will be run the integrity tests each time someone pushes to
# the master branch.
#
# This version relies on wget. wget will run in background.
APP_NAME = "app.name.on.integrity"
USER = "username"
PASS = "password"
DOMAIN = "your.integrity.server.com"
while (input = STDIN.read) != ''
rev_old, rev_new, ref = input.split(" ")
if ref == "refs/heads/master"
`wget -qb --output-file=/dev/null --post-data="" http://#{USER}:#{PASS}@#{DOMAIN}/#{APP_NAME}/commits/#{rev_new}/builds `
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment