From 5170a8ed3a50e958b516c615a005ec35ec9ae9fe Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Thu, 5 Oct 2023 22:30:15 +0200 Subject: [PATCH] Exclude Rails 7.1 from the installer Rails 7.1 is not yet supported, until then we should not attempt installing Solidus with it. --- .circleci/config.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 637b0a87078..ad2ae0e05a7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -156,24 +156,24 @@ commands: ruby -v >> /tmp/.ruby-versions gem --version >> /tmp/.gems-versions bundle --version >> /tmp/.gems-versions - gem search -eq rails >> /tmp/.gems-versions # get the latest rails from rubygems + gem search -eq rails -v "~> 7" -v"< 7.1" >> /tmp/.gems-versions # get the latest rails from rubygems gem search -eq solidus >> /tmp/.gems-versions # get the latest solidus from rubygems cat /tmp/.ruby-versions cat /tmp/.gems-versions - restore_cache: keys: - - solidus-installer-v8-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }} - - solidus-installer-v8-{{ checksum "/tmp/.ruby-versions" }}- + - solidus-installer-v9-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }} + - solidus-installer-v9-{{ checksum "/tmp/.ruby-versions" }}- - run: name: "Prepare the rails application" command: | cp core/spec/solidus_install_coverage.rb /tmp/solidus_install_coverage.rb cd /tmp - test -d my_app || gem install rails solidus + test -d my_app || (gem install rails -v "< 7.1" && gem install solidus) test -d my_app || rails new my_app --skip-git - save_cache: - key: solidus-installer-v8-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }} + key: solidus-installer-v9-{{ checksum "/tmp/.ruby-versions" }}-{{ checksum "/tmp/.gems-versions" }} paths: - /tmp/my_app - /home/circleci/.rubygems @@ -228,7 +228,8 @@ commands: mkdir -p /tmp/dummy_extension cd /tmp/dummy_extension bundle init - bundle add rails sqlite3 <> --skip-install + bundle add rails -v "< 7.1" --skip-install + bundle add sqlite3 <> --skip-install bundle add solidus --path "$(ruby -e"puts File.expand_path ENV['CIRCLE_WORKING_DIRECTORY']")" export LIB_NAME=set # dummy requireable file bundle exec rake -rrails -rspree/testing_support/extension_rake -e'Rake::Task["extension:test_app"].invoke'