template/script/hooks/pre-commit in penchant-0.0.5 vs template/script/hooks/pre-commit in penchant-0.1.0
- old
+ new
@@ -1,15 +1,19 @@
#!/bin/bash
OLD_GIT_DIR=$GIT_DIR
+if [ "$(penchant gemfile-env)" != "remote" ]; then
+ penchant gemfile remote
+fi
+
+bundle exec rake
+R=$?
+if [ $R -ne 0 ]; then exit $R; fi
+
if [ "$(penchant gemfile-env)" != "remote deployment" ]; then
unset GIT_DIR
penchant gemfile remote --deployment
GIT_DIR=$OLD_GIT_DIR
git add Gemfile*
fi
-
-bundle exec rake
-R=$?
-if [ $R -ne 0 ]; then exit $R; fi