Created
March 11, 2010 10:55
-
-
Save gma/329039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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