make hooks a little smarter and forgiving
This commit is contained in:
parent
5cdbdd4ffc
commit
d5403f1139
@ -1,3 +1,3 @@
|
||||
module Penchant
|
||||
VERSION = "0.2.19"
|
||||
VERSION = "0.2.20"
|
||||
end
|
||||
|
@ -29,8 +29,12 @@ if [[ "${msg}" != *"[ci skip]"* ]]; then
|
||||
GIT_DIR=$OLD_GIT_DIR
|
||||
fi
|
||||
|
||||
bundle exec rake
|
||||
R=$?
|
||||
if [ $R -ne 0 ]; then exit $R; fi
|
||||
if [ $(bundle exec rake -P | grep default | wc -l) -ne 0 ]; then
|
||||
bundle exec rake
|
||||
R=$?
|
||||
if [ $R -ne 0 ]; then exit $R; fi
|
||||
else
|
||||
echo "[penchant] No default Rake task found! Add one if you want to run tests before committing."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $(bundle exec rake -T preflight_check | wc -l) -eq 1 ]; then
|
||||
if [ $(bundle exec rake -P | grep preflight_check | wc -l) -ne 0 ]; then
|
||||
bundle exec rake preflight_check
|
||||
R=$?
|
||||
if [ $R -ne 0 ]; then exit $R; fi
|
||||
@ -11,3 +11,4 @@ penchant gemfile remote --deployment
|
||||
GIT_DIR=$OLD_GIT_DIR
|
||||
git add Gemfile*
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user