Skip to content

Commit

Permalink
Updated travis build scripts (from rspec-dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jan 6, 2016
1 parent b8b2935 commit 79fab04
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .rubocop_rspec_base.yml
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

language: ruby
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"
Expand Down
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
14 changes: 12 additions & 2 deletions script/functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand All @@ -11,6 +11,12 @@ export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
SPECS_HAVE_RUN_FILE=specs.out
MAINTENANCE_BRANCH=`cat maintenance-branch`

# Don't allow rubygems to pollute what's loaded. Also, things boot faster
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+
if is_mri_192_plus; then
export RUBYOPT="--disable=gem"
fi

function clone_repo {
if [ ! -d $1 ]; then # don't clone if the dir is already there
travis_retry eval "git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
Expand Down Expand Up @@ -77,7 +83,11 @@ function run_spec_suite_for {
pushd ../$1
unset BUNDLE_GEMFILE
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
travis_retry eval "bundle install $bundle_install_flags"
if is_mri_192_plus; then
travis_retry eval "RUBYOPT=$RUBYOPT:'--enable rubygems' bundle install $bundle_install_flags"
else
travis_retry eval "bundle install $bundle_install_flags"
fi
run_specs_and_record_done
popd
else
Expand Down
14 changes: 13 additions & 1 deletion script/predicate_functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

function is_mri {
Expand Down Expand Up @@ -33,6 +33,18 @@ function is_mri_192 {
fi
}

function is_mri_192_plus {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then
return 0
else
return 1
fi
else
return 1
fi
}

function is_mri_2plus {
if is_mri; then
if ruby -e "exit(RUBY_VERSION.to_f > 2.0)"; then
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
@@ -1,4 +1,4 @@
# This file was generated on 2016-01-04T21:06:21+09:00 from the rspec-dev repo.
# This file was generated on 2016-01-06T22:57:44+11:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# Taken from:
Expand Down

0 comments on commit 79fab04

Please sign in to comment.