Sha256: c67c389935c76dbd1cfccbe991c725b33449e94f538f0ff52591b257b1e9d82e

Contents?: true

Size: 736 Bytes

Versions: 7

Compression:

Stored size: 736 Bytes

Contents

#!/bin/bash

msg=$(cat $1)

OLD_GIT_DIR=$GIT_DIR

# 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

if [[ "${msg}" != *"[ci skip]"* ]]; then
  if [ "$(penchant gemfile-env)" != "remote" ]; then
    unset GIT_DIR
    penchant gemfile remote
    GIT_DIR=$OLD_GIT_DIR
  fi

  bundle exec rake
  R=$?
  if [ $R -ne 0 ]; then exit $R; fi
fi

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
penchant-0.2.19 template/script/hooks/commit-msg
penchant-0.2.18 template/script/hooks/commit-msg
penchant-0.2.17 template/script/hooks/commit-msg
penchant-0.2.16 template/script/hooks/commit-msg
penchant-0.2.15 template/script/hooks/commit-msg
penchant-0.2.14 template/script/hooks/commit-msg
penchant-0.2.13 template/script/hooks/commit-msg