penchant/template/script/hooks/pre-commit

16 lines
229 B
Plaintext
Raw Normal View History

2011-07-14 19:50:51 +00:00
#!/bin/bash
2011-08-18 17:22:01 +00:00
OLD_GIT_DIR=$GIT_DIR
2011-08-18 18:53:55 +00:00
if [ $(penchant gemfile-env) != "remote" ]; then
unset GIT_DIR
penchant gemfile remote
GIT_DIR=$OLD_GIT_DIR
2011-08-18 21:37:54 +00:00
git add Gemfile*
2011-08-18 18:53:55 +00:00
fi
2011-07-14 20:51:54 +00:00
2011-07-14 19:50:51 +00:00
bundle exec rake
2011-07-15 01:15:29 +00:00
R=$?
if [ $R -ne 0 ]; then exit $R; fi
2011-07-14 19:50:51 +00:00