2012-04-20 15:26:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
msg=$(cat $1)
|
|
|
|
|
|
|
|
OLD_GIT_DIR=$GIT_DIR
|
|
|
|
|
2012-07-24 15:07:42 +00:00
|
|
|
# lion appears to insert git paths before everything else. ensure rvm can
|
|
|
|
# bust through, at the very least.
|
|
|
|
if [ ! -z "$MY_RUBY_HOME" ]; then
|
|
|
|
PATH="$MY_RUBY_HOME/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$GEM_PATH" ]; then
|
|
|
|
oifs="$IFS"
|
|
|
|
while IFS=":" read -ra GEM_PATHS; do
|
|
|
|
FIXED_GEM_PATH=""
|
|
|
|
for i in "${GEM_PATHS[@]}"; do
|
|
|
|
FIXED_GEM_PATH="$FIXED_GEM_PATH:${i}/bin"
|
|
|
|
done
|
|
|
|
done <<< "$GEM_PATH"
|
|
|
|
IFS="$oifs"
|
|
|
|
PATH="$FIXED_GEM_PATH:$PATH"
|
|
|
|
fi
|
|
|
|
|
2012-04-20 15:26:27 +00:00
|
|
|
if [[ "${msg}" != *"[ci skip]"* ]]; then
|
|
|
|
if [ "$(penchant gemfile-env)" != "remote" ]; then
|
2012-04-20 18:52:57 +00:00
|
|
|
unset GIT_DIR
|
2012-04-20 15:26:27 +00:00
|
|
|
penchant gemfile remote
|
2012-04-20 18:52:57 +00:00
|
|
|
GIT_DIR=$OLD_GIT_DIR
|
2012-04-20 15:26:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
bundle exec rake
|
|
|
|
R=$?
|
|
|
|
if [ $R -ne 0 ]; then exit $R; fi
|
|
|
|
fi
|
|
|
|
|