From 92a2df480242e68847dd6f0f8f3297ad6f509bc7 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Fri, 29 Dec 2023 18:36:08 +0100 Subject: [PATCH] Get known rails branches from the git repo --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 0fc5e12ecc..737acb51a5 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,8 @@ source 'https://rubygems.org' gemspec require: false # rubocop:disable Bundler/DuplicatedGem -if ENV['RAILS_VERSION'] == 'main' - gem 'rails', github: 'rails', require: false +if %r{^(main|\d-\d-stable)$}.match? ENV['RAILS_VERSION'] + gem 'rails', github: 'rails', require: false, branch: ENV['RAILS_VERSION'] else gem 'rails', ENV['RAILS_VERSION'] || '~> 7.1.0', require: false end