1

I would like my post-receive hook to run a certain script whenever files of a certain type, *.hbm.xml are pushed to the server. Motivation: I want to rev my database schema version number whenever NHibernate files are changed.

Thanks!

Raydel Miranda
  • 13,825
  • 3
  • 38
  • 60
Jacko
  • 12,665
  • 18
  • 75
  • 126

1 Answers1

1

This is what I came up with:

for i in `git show --pretty="format:" --name-only HEAD | grep '.*\.hbm\.xml' `; do
    # call script here.....
    exit
done
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Jacko
  • 12,665
  • 18
  • 75
  • 126