diff --git a/.travis.yml b/.travis.yml index 1bedc7a937..1d98464b37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ language: ruby sudo: required addons: chrome: stable - apt: - packages: - - dpkg - - chromium-chromedriver # We deviate from the rspec-dev cache setting here. # @@ -29,6 +25,7 @@ cache: bundler bundler_args: "--binstubs --path ../bundle --retry=3 --jobs=3" before_install: + - script/install_chrome_driver - script/update_rubygems_and_install_bundler - script/clone_all_rspec_repos @@ -36,7 +33,6 @@ before_script: # Rails 4+ complains with a bundler rails binstub in PROJECT_ROOT/bin/ - rm -f bin/rails - bundle exec rails --version - - ln -s /usr/lib/chromium-browser/chromedriver ~/bin/chromedriver script: "script/run_build 2>&1" diff --git a/script/install_chrome_driver b/script/install_chrome_driver new file mode 100755 index 0000000000..098075d9bb --- /dev/null +++ b/script/install_chrome_driver @@ -0,0 +1,12 @@ +#!/bin/bash + +CHROME_VERSION=$(google-chrome --version | grep -iE "[0-9.]{10,20}" | sed -E "s/.* ([0-9]+)\.[0-9]+\.[0-9]+\..*/\1/") +echo $CHROME_VERSION + +LATEST=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION) +echo $LATEST + +curl "https://chromedriver.storage.googleapis.com/$LATEST/chromedriver_linux64.zip" > chromedriver_linux64.zip + +unzip chromedriver_linux64.zip +mv chromedriver ~/bin/chromedriver