Skip to content

Commit 42c7ec6

Browse files
committed
Bump to Ruby 3.4.4
I had to update the Makefile, as any compiled gems were still compiled for the previous version of Ruby.
1 parent 61b5f13 commit 42c7ec6

3 files changed

Lines changed: 22 additions & 10 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
3030
# ruby: ["3.3", "3.4", head, jruby, truffleruby, truffleruby+graalvm]
31-
ruby: ["3.4"]
31+
ruby: ["3.4.4"]
3232
runs-on: ${{ matrix.os }}
3333
steps:
3434
- name: Checkout repo

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ruby 3.4.3
1+
ruby 3.4.4
22
bun latest

Makefile

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
SHELL := /bin/bash
2-
BUNDLE_CHECK := $(shell bundle check >/dev/null ; echo $$?)
32

43
all: setup test lint
54

@@ -17,13 +16,21 @@ lint: markdownlint rubocop
1716
rspec: bundle
1817
DEBUG=0 bundle exec rspec
1918

20-
bundle:
21-
ifneq ($(BUNDLE_CHECK), 0)
22-
@bundle
23-
endif
19+
bundle: .tool-versions
20+
# Remove vendor/bundle if Ruby version changed
21+
@current_ruby_version=$$(ruby -e 'print RUBY_VERSION'); \
22+
desired_ruby_version=$$(grep '^ruby ' .tool-versions | awk '{print $$2}'); \
23+
if [ -d vendor/bundle ] && [ "$$current_ruby_version" != "$$desired_ruby_version" ]; then \
24+
echo "Ruby version changed ($$current_ruby_version -> $$desired_ruby_version), removing vendor/bundle..."; \
25+
rm -rf vendor/bundle; \
26+
fi
27+
@if [ .tool-versions -nt Gemfile.lock ] || ! bundle check >/dev/null ; then \
28+
mise install ; \
29+
bundle install ; \
30+
fi
2431

2532
Gemfile.lock: Gemfile
26-
@bundle
33+
@bundle install
2734

2835
rubocop:
2936
bundle exec rubocop .
@@ -34,7 +41,12 @@ markdownlint: node_modules/.bin/markdownlint-cli2
3441
node_modules/.bin/markdownlint-cli2:
3542
@bun install markdownlint-cli2
3643

37-
bun:
38-
@which bun >/dev/null || mise install bun || curl -fsSL https://bun.sh/install | bash
44+
bun: .tool-versions
45+
@if [ .tool-versions -nt bun.lock ] ; then \
46+
echo running mise ; \
47+
mise install bun ; \
48+
echo running bundle ; \
49+
bundle install ; \
50+
fi
3951

4052
.PHONY: all setup test specs console lint rspec bundle rubocop markdownlint bun

0 commit comments

Comments
 (0)