Skip to content

Instantly share code, notes, and snippets.

@gma
Created March 11, 2010 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gma/329039 to your computer and use it in GitHub Desktop.
Save gma/329039 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Copy this script to hooks/post-receive in your main git repository
# in order to prompt integrity to build the latest version of your project
# when changes are pushed. Don't forget to make it executable with chmod +x.
HOSTNAME="your.integrity.server"
# Set the username and password if your server is protected with basic auth
#
#USER="username"
#PASSWORD="secret"
if [ -n "$USER" ]; then
CREDENTIALS="$USER:$PASSWORD@"
else
CREDENTIALS=""
fi
PROJECT_DIR="$(basename $(dirname $(cd $(dirname $0); pwd)))"
PROJECT="$(echo $PROJECT_DIR | sed 's,\.git$,,')"
curl -d '' http://${CREDENTIALS}${HOSTNAME}/$PROJECT/builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment