Skip to content

Commit 56ab073

Browse files
committed
Support any Rails branch in CI
1 parent ae733fd commit 56ab073

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ WORKDIR $WORKDIR
99

1010
COPY . $WORKDIR
1111

12-
RUN RAILS_MAIN=1 bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3
12+
RUN RAILS_BRANCH=7-2-stable bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3
1313

1414
CMD ["sh"]

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ gem "msgpack", ">= 1.7.0"
1616

1717
if ENV["RAILS_SOURCE"]
1818
gemspec path: ENV["RAILS_SOURCE"]
19-
elsif ENV["RAILS_MAIN"]
20-
gem "rails", github: "rails/rails", branch: 'main'
19+
elsif ENV["RAILS_BRANCH"]
20+
gem "rails", github: "rails/rails", branch: ENV["RAILS_BRANCH"]
2121
else
2222
# Need to get rails source because the gem doesn't include tests
2323
version = ENV["RAILS_VERSION"] || begin

docker-compose.ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
ci:
66
environment:
77
- ACTIVERECORD_UNITTEST_HOST=sqlserver
8-
- RAILS_MAIN=1
8+
- RAILS_BRANCH=7-2-stable
99
build:
1010
context: .
1111
dockerfile: Dockerfile.ci

0 commit comments

Comments
 (0)