From c84889b9b9f6503dab4dc8c26a17afb9108cc21f Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 5 Oct 2021 16:51:03 +0200 Subject: [PATCH] TruffleRuby correctly changes the ABI version now --- bundler.js | 3 ++- dist/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index c79d192..7b03241 100644 --- a/bundler.js +++ b/bundler.js @@ -183,7 +183,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cacheVersionSuffix = DEFAULT_CACHE_VERSION === cacheVersion ? '' : `-cachever:${cacheVersion}` let key = `setup-ruby-bundler-cache-v3-${platform}-${engine}-${version}${cacheVersionSuffix}` - if (engine !== 'jruby' && common.isHeadVersion(version)) { + if (engine === 'ruby' && common.isHeadVersion(version)) { + // CRuby dev versions do not change the ABI version when the ABI changes, so append the commit to the ABI version let revision = ''; await exec.exec('ruby', ['-e', 'print RUBY_REVISION'], { silent: true, diff --git a/dist/index.js b/dist/index.js index 417db9b..b48bce9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -197,7 +197,8 @@ async function computeBaseKey(platform, engine, version, lockFile, cacheVersion) const cacheVersionSuffix = DEFAULT_CACHE_VERSION === cacheVersion ? '' : `-cachever:${cacheVersion}` let key = `setup-ruby-bundler-cache-v3-${platform}-${engine}-${version}${cacheVersionSuffix}` - if (engine !== 'jruby' && common.isHeadVersion(version)) { + if (engine === 'ruby' && common.isHeadVersion(version)) { + // CRuby dev versions do not change the ABI version when the ABI changes, so append the commit to the ABI version let revision = ''; await exec.exec('ruby', ['-e', 'print RUBY_REVISION'], { silent: true,