Skip to content

Instantly share code, notes, and snippets.

@asux
Created September 14, 2011 10:32
Show Gist options
  • Save asux/1216277 to your computer and use it in GitHub Desktop.
Save asux/1216277 to your computer and use it in GitHub Desktop.
post-update Git hook for update repo in Redmine
#!/bin/bash
path="$(realpath $(dirname $0)/..)"
source /etc/profile.d/rvm.sh
cd /var/www/redmine
echo -n "Fetching changests for $(basename ${path}) repository in Redmine ... "
bundle exec rails runner -e production "Repository.find_by_url('${path}').fetch_changesets" && echo "OK" || echo "FAIL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment