Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix pull-request detection for real.
  • Loading branch information
nex3 committed Dec 11, 2016
1 parent aa87ff1 commit eb32633
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Expand Up @@ -2,6 +2,14 @@ sudo: false
language: ruby
cache: bundler
install:
# If we're running for a pull request, check out the revision of sass-spec
# referenced by that pull request.
- if-pr() { if [ ! -z "$TRAVIS_PULL_REQUEST" -a "$TRAVIS_PULL_REQUEST" != false ]; then "$@"; fi }
- if-pr mkdir sass-spec
- if-pr git -C sass-spec init
- if-pr git -C sass-spec pull --depth=1 git://github.com/sass/sass-spec `extra/sass-spec-ref.sh`
- if-pr bundle config local.sass-spec "`pwd`/sass-spec"

- bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
- bundle update sass-spec
rvm:
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Expand Up @@ -36,5 +36,4 @@ gem 'minitest', '>= 5.0.0', '< 6.0.0', :group => :test

#gem "sass-spec", :path => "../sass-spec"
pr = ENV['TRAVIS_PULL_REQUEST']
gem "sass-spec", :git => 'https://github.com/sass/sass-spec.git',
:ref => (pr ? `#{File.dirname(__FILE__)}/extra/sass-spec-ref.sh`.rstrip : 'master')
gem "sass-spec", :git => 'https://github.com/sass/sass-spec.git', :branch => 'master'

0 comments on commit eb32633

Please sign in to comment.