Skip to content

Instantly share code, notes, and snippets.

@sr

sr/ci

Created September 1, 2010 15:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sr/560855 to your computer and use it in GitHub Desktop.
Save sr/560855 to your computer and use it in GitHub Desktop.
sandboxed CI script for bundler 0.9 and 1.0
#!/bin/sh
source `dirname $0`/ci-env
if [[ -x script/ci ]]; then
script/ci
else
test -f Gemfile.lock
if [ `head -n1 Gemfile.lock` == "GEM" ]; then
gem install bundler --no-rdoc --no-ri
bundle --deployment
else
gem install bundler -v 0.9.26 --no-rdoc --no-ri
bundle install --disable-shared-gems
fi
time bundle exec rake
fi
#!/bin/sh
set -e
set -x
unset -v RUBYOPT
unset -v BUNDLE_GEMFILE
unset -v BUNDLE_PATH
unset -v SSH_KEY
unset -v GIT_SSH
unset -v GEM_HOME
unset -v GEM_PATH
HOME=`pwd`/home
GEM_HOME=$HOME/.gem
GEM_PATH=$HOME/.gembin
PATH=$GEM_HOME/bin:$PATH
export HOME PATH GEM_HOME GEM_PATH
mkdir -p $HOME $GEM_HOME $GEM_PATH
env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment